Package com.webobjects.eocontrol

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


                String partialKeyPath=KeyValuePath.keyPathWithoutLastProperty(propertyKey);
                Object rawLastEO=object.valueForKeyPath(partialKeyPath);
                lastEO=rawLastEO instanceof EOEnterpriseObject ? (EOEnterpriseObject)rawLastEO : null;
            }
            if (lastEO!=null) {
                EOEntity entity=EOModelGroup.defaultGroup().entityNamed(lastEO.entityName());
                String lastKey=KeyValuePath.lastPropertyKeyInKeyPath(propertyKey);
                result=entity.relationshipNamed(lastKey);
            }
        }
        if (result==null && propertyKey!=null) {
View Full Code Here


        EOEnterpriseObject eo = (EOEnterpriseObject)objectKeyPathValue();
        EditPageInterface epi = null;
        if (eo == null) {
            parent().validationFailedWithException(new NSValidation.ValidationException(errorMessage()),objectPropertyValue(), key());
        } else {
            String editConfigurationName = (String)ERDirectToWeb.d2wContextValueForKey("editConfigurationName", eo.entityName());
            epi = (EditPageInterface)D2W.factory().pageForConfigurationNamed(editConfigurationName, session());
            epi.setNextPage(context().page());
            if (((ERXEnterpriseObject)eo).isNewObject())
                localContext = ERXEC.newEditingContext(object().editingContext(), false);
            else
View Full Code Here

    public WOComponent toOneAction() {
        EOEnterpriseObject anEO = browserItem;
        if(anEO == null) {
            return null;
        } else {
            InspectPageInterface inspectPage = (InspectPageInterface) D2W.factory().pageForConfigurationNamed("Inspect" + anEO.entityName(), session());
            inspectPage.setObject(anEO);
            inspectPage.setNextPage(context().page());
            return (WOComponent)inspectPage;
        }
    }
View Full Code Here

                    D2WContext context = d2wContext();
                    Object o = ex.object();

                    if (o instanceof EOEnterpriseObject) {
                        EOEnterpriseObject eo = (EOEnterpriseObject) o;
                        context.takeValueForKey(eo.entityName(), "entityName");
                        context.takeValueForKey(ex.propertyKey(), "propertyKey");
                    }
                    ((ERXValidationException) exception).setContext(context);
                   
                    log.info("Validation Exception: " + exception + exception.getMessage());
View Full Code Here

                    D2WContext context = d2wContext();
                    Object o = ex.object();

                    if (o instanceof EOEnterpriseObject) {
                        EOEnterpriseObject eo = (EOEnterpriseObject) o;
                        context.takeValueForKey(eo.entityName(), "entityName");
                        context.takeValueForKey(ex.propertyKey(), "propertyKey");
                    }
                    ((ERXValidationException) exception).setContext(context);
                   
                    log.info("Validation Exception: " + exception + exception.getMessage());
View Full Code Here

    public WOComponent toOneAction() {
        EOEnterpriseObject anEO = _eo();
        if(anEO == null) {
            return null;
        } else {
            InspectPageInterface inspectPage = (InspectPageInterface) D2W.factory().pageForConfigurationNamed("AjaxInspect" + anEO.entityName(), session());
            inspectPage.setObject(anEO);
            inspectPage.setNextPage(context().page());
            return (WOComponent)inspectPage;
        }
    }
View Full Code Here

    public WOComponent toOneAction() {
        EOEnterpriseObject anEO = browserItem;
        if(anEO == null) {
            return null;
        } else {
            InspectPageInterface inspectPage = (InspectPageInterface) D2W.factory().pageForConfigurationNamed("AjaxInspect" + anEO.entityName(), session());
            inspectPage.setObject(anEO);
            inspectPage.setNextPage(context().page());
            return (WOComponent)inspectPage;
        }
    }
View Full Code Here

    public WOComponent toOneAction() {
        EOEnterpriseObject anEO = object();
        if(anEO == null) {
            return null;
        } else {
            InspectPageInterface inspectPage = (InspectPageInterface) D2W.factory().pageForConfigurationNamed("AjaxInspect" + anEO.entityName(), session());
            inspectPage.setObject(anEO);
            inspectPage.setNextPage(context().page());
            return (WOComponent)inspectPage;
        }
    }
View Full Code Here

    //CHECKME ak is this description correct?
    public static NSArray snapshotsForObjectsFromRelationshipNamed(NSArray eos, String relKey) {
      NSMutableArray result = new NSMutableArray();
      if (eos.count() > 0) {
        EOEnterpriseObject eo = (EOEnterpriseObject)eos.lastObject();
        String entityName = eo.entityName();
        EOEditingContext ec = eo.editingContext();
        EOEntity entity = ERXEOAccessUtilities.entityNamed(ec, entityName);
        EORelationship relationship = entity.relationshipNamed(relKey);
        if(relationship.sourceAttributes().count() == 1) {
          EOAttribute attribute = relationship.sourceAttributes().lastObject();
View Full Code Here

    protected void handleSave(EOEditingContext ec, String typeKey, NSArray objects) {
        if (objects == null)
            return;
        for (Enumeration e = objects.objectEnumerator(); e.hasMoreElements();) {
            EOEnterpriseObject eo = (EOEnterpriseObject) e.nextElement();
            Configuration config = configuration.objectForKey(eo.entityName());

            if (config != null) {
                if (config.isAudited) {
                    handleSave(ec, typeKey, eo);
                } 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.