Examples of valueForKeyPath()


Examples of com.webobjects.appserver.WOComponent.valueForKeyPath()

          _sourceObject = parent;
          _relationshipKey = selectionKeyPath;
        }
        else {
          String sourceObjectKeyPath = selectionKeyPath.substring(0, lastDotIndex);
          _sourceObject = parent.valueForKeyPath(sourceObjectKeyPath);
          _relationshipKey = selectionKeyPath.substring(lastDotIndex + 1);
          if (_sourceObject instanceof EOEnterpriseObject) {
            _sourceEntityName = ((EOEnterpriseObject)_sourceObject).entityName();
          }
        }
View Full Code Here

Examples of com.webobjects.directtoweb.D2WContext.valueForKeyPath()

    @Override
    public boolean evaluateWithObject(Object o) {
        // FIXME here -- this could be sth else..
        D2WContext c=(D2WContext)o;
        EOEntity e=(EOEntity)c.valueForKeyPath(_keyPath);
        return isKindOfEntity(e);
    }

    public boolean isKindOfEntity(EOEntity e) {
        return e.name().equals(_entityName) ? true : (e.parentEntity()!= null ? isKindOfEntity(e.parentEntity()) : false);
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.valueForKeyPath()

            if(PropertyKeyWithoutLastProperty!=null){
                objectForPropertyDisplayed = object!=null ? (EOEnterpriseObject)object.valueForKeyPath(PropertyKeyWithoutLastProperty) : null;
            }else{
                objectForPropertyDisplayed = object;
            }
            userInfoUnitString = objectForPropertyDisplayed!=null ? (String)objectForPropertyDisplayed.valueForKeyPath(keyPath) : null;
        }
        return userInfoUnitString;
    }

    /**
 
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.valueForKeyPath()

            if(indexOfDot > 0) {
                String entityName = keyPath.substring(0, indexOfDot);
                String relationshipPath = keyPath.substring(indexOfDot+1, keyPath.length());
                EOEnterpriseObject eo = EOUtilities.objectWithPrimaryKey(ec, entityName, primaryKeyFromRequest(ec, entityName));
                EOArrayDataSource ds = new EOArrayDataSource(cd, ec);
                ds.setArray((NSArray)eo.valueForKeyPath(relationshipPath));
                return ds;
            }
        }
        return null;
    }
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.valueForKeyPath()

    }

    private EOEnterpriseObject relationshipObject() {
        EOEnterpriseObject object = object();
        if(!relationshipName().equals(key())) {
            object = (EOEnterpriseObject)object.valueForKeyPath(ERXStringUtilities.keyPathWithoutLastProperty(key()));
        }
        return object;
    }
   
    public void removeObject(EOEnterpriseObject objectToRemove) {
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.valueForKeyPath()

                        String relationshipKey = (String)e.nextElement();
                        String objectKeyPath = (String)postRelationshipKeys.objectForKey(relationshipKey);
                        if (objectKeyPath.equals("this")) {
                            localObject = localEO;
                        } else {
                            localObject = (EOEnterpriseObject)localEO.valueForKeyPath(objectKeyPath);
                        }
                        localObject.addObjectToBothSidesOfRelationshipWithKey(savedObject, relationshipKey);
                    }
                }
            }
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.valueForKeyPath()

        if(anEO != null) {
            String keyWhenRelationship = keyWhenRelationship();
            if(keyWhenRelationship == null || keyWhenRelationship.equals("userPresentableDescription"))
                return anEO.userPresentableDescription();
            else
                return anEO.valueForKeyPath(keyWhenRelationship);
        } else {
            return null;
        }
    }
   
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.valueForKeyPath()

      NSLog.debug.appendln("attribute.name() == null, attribute = "+attribute);
        } else {
      //NSLog.debug.appendln("checking eo="+eoentity.name()+", attributename="+attribute.name());
      EOClassDescription eoclassdescription = EOClassDescription.classDescriptionForEntityName(eoentity.name());
      EOEnterpriseObject eoenterpriseobject = eoclassdescription.createInstanceWithEditingContext(null, null);
                        eoenterpriseobject.valueForKeyPath(attribute.name());
                       
        }
    } catch (com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException e1) {
        //NSLog.debug.appendln(e1);
        NSLog.out.appendln("attribute "+attribute.name() + " does not exist in entity " + name() + " anymore, deleted from Valididy model");
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.valueForKeyPath()

        if(anEO != null) {
            String keyWhenRelationship = keyWhenRelationship();
            if(keyWhenRelationship == null || keyWhenRelationship.equals("userPresentableDescription"))
                return anEO.userPresentableDescription();
            else
                return anEO.valueForKeyPath(keyWhenRelationship);
        } else {
            return null;
        }
    }
   
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.valueForKeyPath()

            EOEditingContext ec = eo.editingContext();
            EOClassDescription cd = eo.classDescription();
            if (cd.attributeKeys().containsObject(key)) {
                value = NSKeyValueCodingAdditions.Utility.valueForKeyPath(eo, key);
            } else if (cd.toOneRelationshipKeys().containsObject(key)) {
                value = eo.valueForKeyPath(key);
            } else if (EOUtilities.entityNamed(ec, eo.entityName()).primaryKeyAttributeNames().containsObject(key)) {
                // when object is an EO and key is a cross-relationship keypath, we drop through to this case
                // and we'll fail.
                value = EOUtilities.primaryKeyForObject(ec,eo).objectForKey(key);
            } else {
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.