Examples of EODetailDataSource


Examples of com.webobjects.eocontrol.EODetailDataSource

        _relationshipKey = relationshipKey;
        if (object().isToManyKey(relationshipKey))
            isRelationshipToMany = true;
        else
            relationshipDisplayGroup.setSelectsFirstObjectAfterFetch(true);
        EODetailDataSource ds = new EODetailDataSource(object().classDescription(), _relationshipKey);
        ds.qualifyWithRelationshipKey(_relationshipKey, localEO);
        setDataSource(ds);
        relationshipDisplayGroup.setDataSource(ds);
        relationshipDisplayGroup.fetch();
        setPropertyKey(displayKey());
    }
View Full Code Here

Examples of com.webobjects.eocontrol.EODetailDataSource

        _relationshipKey = relationshipKey;

        if (!object().isToManyKey(relationshipKey))
            throw new RuntimeException(relationshipKey+" is not a to-many relationship");
       
        EODetailDataSource relationshipDataSource = new EODetailDataSource(object().classDescription(), relationshipKey());
        relationshipDataSource.qualifyWithRelationshipKey(relationshipKey(), newObject);
        setDataSource(relationshipDataSource);
        relationshipDisplayGroup.setDataSource(relationshipDataSource);

        if(isSortedRelationship()){
            EOSortOrdering indexOrdering = EOSortOrdering.sortOrderingWithKey(indexKey(),
View Full Code Here

Examples of com.webobjects.eocontrol.EODetailDataSource

     * @param object that has the relationship
     * @param key relationship key
     * @return detail data source for the given object-key pair.
     */
    public static EODetailDataSource dataSourceForObjectAndKey(EOEnterpriseObject object, String key) {
        EODetailDataSource eodetaildatasource = new EODetailDataSource(EOClassDescription.classDescriptionForEntityName(object.entityName()), key);
        eodetaildatasource.qualifyWithRelationshipKey(key, object);
        return eodetaildatasource;
    }
View Full Code Here

Examples of com.webobjects.eocontrol.EODetailDataSource

    private EODetailDataSource _detailDataSource;
    public EODataSource detailDataSource() {
        if (_detailDataSource==null) {
            String relationshipKey=selectionListKey()!=null ? selectionListKey() : key();
            _detailDataSource=new EODetailDataSource(object().classDescription(), relationshipKey);
            _detailDataSource.qualifyWithRelationshipKey(relationshipKey, object());
        }
        return _detailDataSource;
    }
View Full Code Here

Examples of com.webobjects.eocontrol.EODetailDataSource

   
    // accessors
    public EODetailDataSource detailDataSource() {
      if (detailDataSource == null) {
        EOEnterpriseObject object = (EOEnterpriseObject) valueForBinding("object");
        detailDataSource = new EODetailDataSource(object.classDescription(), key());
        detailDataSource.qualifyWithRelationshipKey(key(), object);
        detailDataSource.fetchObjects();
      } return detailDataSource;
    }
View Full Code Here

Examples of com.webobjects.eocontrol.EODetailDataSource

    _objectToAddToRelationship = (EOEnterpriseObject) in.readObject();
    _selectedObject = (EOEnterpriseObject) in.readObject();
    _relationshipKey = (String) in.readObject();
    isRelationshipToMany = in.readBoolean();
    _dataSource = (EODataSource) in.readObject();
    EODetailDataSource ds = (EODetailDataSource) in.readObject();
    ds.qualifyWithRelationshipKey(_relationshipKey, _masterObject);
    _relationshipDisplayGroup = (WODisplayGroup) in.readObject();
    _selectDataSource = (EODataSource) in.readObject();
    String inlineTask = (String) in.readObject();
    if(inlineTask != null) {
      d2wContext().takeValueForKey(inlineTask, "inlineTask");
View Full Code Here

Examples of com.webobjects.eocontrol.EODetailDataSource

    public void postDeleteNotification() {
      Object obj = parentD2WPage();
      String OBJECT_KEY = "object";
      NSMutableDictionary<String, Object> userInfo = new NSMutableDictionary<String, Object>(obj, OBJECT_KEY);
    if (dataSource() instanceof EODetailDataSource) {
      EODetailDataSource dds = (EODetailDataSource)dataSource();
      userInfo.setObjectForKey(dds.masterObject(), OBJECT_KEY);
      userInfo.setObjectForKey(dds.detailKey(), "propertyKey");
    }
      NSNotificationCenter.defaultCenter().postNotification(BUTTON_PERFORMED_DELETE_ACTION, obj, userInfo);
    }
View Full Code Here

Examples of com.webobjects.eocontrol.EODetailDataSource

    public Boolean showRemoveButton() {
      if (_showRemoveButton == null) {
        boolean isRemoveable = ERXValueUtilities.booleanValueWithDefault(d2wContext().valueForKey("isEntityRemoveable"), false);
        EODataSource ds = dataSource();
        if (ds!= null && ds instanceof EODetailDataSource) {
          EODetailDataSource dds = (EODetailDataSource)ds;
          EOEnterpriseObject masterObj = (EOEnterpriseObject)dds.masterObject();
          EOEntity masterEntity = ERXEOAccessUtilities.entityForEo(masterObj);
          EORelationship relationship = masterEntity.relationshipNamed(dds.detailKey());
          EORelationship reverseRelationship = relationship.inverseRelationship();
          if(isRemoveable) {
            if(reverseRelationship == null) {
              _showRemoveButton = Boolean.TRUE;
            } else {
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EODetailDataSource

  public DisplayGroup(WooModel model) {
    _wooModel = model;
    _wooModel.getModelGroup();
    _databaseDataSource = new EODatabaseDataSource(_wooModel.getModelGroup());
    _detailDataSource = new EODetailDataSource(_wooModel.getModelGroup());
    _dataSource = _databaseDataSource;
    _qualificationIndex = 0;
    _qualifierFormat = QUALIFICATION_FORMATS[0];
    _className = "WODisplayGroup";
    _classNameIndex = getClassNameList().indexOf(_className);
View Full Code Here

Examples of org.objectstyle.wolips.eomodeler.core.model.EODetailDataSource

      } catch (Throwable e) {
        e.printStackTrace();
      }

      if (_dataSource instanceof EODetailDataSource) {
        EODetailDataSource ds = (EODetailDataSource) _dataSource;
        _hasMasterDetail = true;
        setMasterEntityName(ds.getMasterClass());
        setDetailKeyName(ds.getDetailKey());
        _detailDataSource = ds;
      }
      else if (_dataSource instanceof EODatabaseDataSource) {
        EODatabaseDataSource ds = (EODatabaseDataSource) _dataSource;
        _hasMasterDetail = false;
        setEntityName(ds.getEntityName());
        _databaseDataSource = ds;
      }

      if (_entityName == null) {
        // XXX Invalid display group
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.