Examples of ERDPickPageInterface


Examples of er.directtoweb.interfaces.ERDPickPageInterface

            selectedObjects().removeObject(object());
        }
    }

    public NSMutableArray selectedObjects() {
      ERDPickPageInterface pickPage = parentPickPage();
      //ak: crude hack, we should convert to mutable and set the changed array
      return (NSMutableArray) pickPage.selectedObjects();
    }
View Full Code Here

Examples of er.directtoweb.interfaces.ERDPickPageInterface

            String pickTypePageConfiguration = null;
            if (hasBinding("pickTypePageConfiguration"))
                pickTypePageConfiguration = (String)valueForBinding("pickTypePageConfiguration");
            else
                pickTypePageConfiguration = "SelectPickType" + relationshipEntityName();
            ERDPickPageInterface ppi = (ERDPickPageInterface)D2W.factory().pageForConfigurationNamed(pickTypePageConfiguration, session());
            ppi.setNextPageDelegate(createEOWithChoices);
            ppi.setCancelPage(context().page());
            NSMutableArray choices = new NSMutableArray();
            for (Enumeration e = entityNamesForNewInstances().objectEnumerator(); e.hasMoreElements();) {
                String entityName = (String)e.nextElement();
                String displayNameForEntity = (String)ERDirectToWeb.d2wContextValueForKey("displayNameForEntity", entityName, null);
                if (entityName != null && displayNameForEntity != null) {
                    choices.addObject(new EOCreationMultipleChoice(displayNameForEntity, entityName));
                }
            }
            ppi.setChoices(choices);
            result = (WOComponent)ppi;
        }
        return result != null ? result : createEOWithChoices.nextPage();
    }
View Full Code Here

Examples of er.directtoweb.interfaces.ERDPickPageInterface

      EOEntity pickEntity = ERXEOAccessUtilities.destinationEntityForKeyPath(entity, keyPath);
      String pickConfigurationName = (String) valueForBinding("pickConfigurationName");
      if(pickConfigurationName == null) {
        pickConfigurationName = "Pick" + pickEntity.name();
      }
      ERDPickPageInterface epi= (ERDPickPageInterface)D2W.factory().pageForConfigurationNamed(pickConfigurationName, session());
      epi.setDataSource(new EODatabaseDataSource(object().editingContext(), pickEntity.name()));
      epi.setSelectedObjects(((NSArray)object().valueForKeyPath(keyPath + ".@unique")).mutableClone());
      epi.setNextPageDelegate( new ERDPickIntermediateDelegate(object(), relationshipName, pickRelationshipName, context().page()));
     
      nextPage = (WOComponent)epi;
      return nextPage;
    }
View Full Code Here

Examples of er.directtoweb.interfaces.ERDPickPageInterface

        return (ERDPickPageInterface)enclosingPageOfClass(ERDPickPageInterface.class);
    }

    /** Selects all objects. */
    public WOComponent selectAllAction() {
        ERDPickPageInterface parent = parentPickPage();
        if(parent != null) {
            NSMutableArray selectedObjects = new NSMutableArray();
            NSArray list = displayGroup().allObjects();
            if(displayGroup().qualifier() != null) {
                list = EOQualifier.filteredArrayWithQualifier(list, displayGroup().qualifier());
            }
            for (Enumeration e=list.objectEnumerator();e.hasMoreElements();) {
                selectedObjects.addObject(e.nextElement());
            }
            parent.setSelectedObjects(selectedObjects);
        }
        return null;
    }
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.