Package com.webobjects.eocontrol

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


        _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

     * @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

    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

   
    // 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

    _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

    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

    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

TOP

Related Classes of com.webobjects.eocontrol.EODetailDataSource

Copyright © 2018 www.massapicom. 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.