Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSArray.objectEnumerator()


        editContext.takeValueForKey("massModify", "subTask");

        // we then wipe any default value that might have been put in the EO
        NSArray dpk=(NSArray)editContext.valueForKey("displayPropertyKeys");
        cb.displayPropertyKeys=dpk;
        for (Enumeration e=dpk.objectEnumerator(); e.hasMoreElements();) {
            String key=(String)e.nextElement();
            if(key.matches("^((\\w+).?)+$")) {
                newEO.takeValueForKey(null,key);
                // we don't care much about back relationships..
            }
View Full Code Here


            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

            (String)conditionAssignment.objectForKey("qualifierFormat");
        NSArray args = (NSArray)conditionAssignment.objectForKey("args");
        if (args != null && args.count() > 0) {
            // Need to resolve the args from the context.
            NSMutableArray argHolder = new NSMutableArray(args.count());
            for (Enumeration argEnumerator = args.objectEnumerator(); argEnumerator.hasMoreElements();) {
                Object arg = argEnumerator.nextElement();
                if (arg instanceof String && ((String)arg).length() > 1 && ((String)arg).charAt(0) == '^') {
                    Object value = c.valueForKeyPath(((String)arg).substring(1, ((String)arg).length()));
                    if (value == null)
                        value = NSKeyValueCoding.NullValue;
View Full Code Here

       result = ((IERXEOContainer)obj).toGIDContainer();
     }
     else if (obj instanceof NSArray) {
       NSArray eoful = (NSArray)obj;
       NSMutableArray gidful = new NSMutableArray();
       Enumeration objEnum = eoful.objectEnumerator();
       while (objEnum.hasMoreElements()) {
         gidful.addObject(ERXEOControlUtilities.convertEOtoGID(objEnum.nextElement()));
       }
       result = gidful;
     }
View Full Code Here

       result = gidful;
     }
     else if (obj instanceof NSSet) {
       NSSet eoful = (NSSet)obj;
       NSMutableSet gidful = new NSMutableSet();
       Enumeration objEnum = eoful.objectEnumerator();
       while (objEnum.hasMoreElements()) {
         gidful.addObject(ERXEOControlUtilities.convertEOtoGID(objEnum.nextElement()));
       }
       result = gidful;
     }
View Full Code Here

       result = ((IERXGIDContainer)obj).toEOContainer(editingContext);
     }
     else if (obj instanceof NSArray) {
       NSArray gidful = (NSArray)obj;
       boolean allGIDs = true;
       Enumeration objEnum = gidful.objectEnumerator();
       while (allGIDs && objEnum.hasMoreElements()) {
         allGIDs = (objEnum.nextElement() instanceof EOGlobalID);
       }
       if (allGIDs) {
         result = ERXEOGlobalIDUtilities.fetchObjectsWithGlobalIDs(editingContext, gidful);
View Full Code Here

       if (allGIDs) {
         result = ERXEOGlobalIDUtilities.fetchObjectsWithGlobalIDs(editingContext, gidful);
       }
       else {
         NSMutableArray eoful = new NSMutableArray();
         objEnum = gidful.objectEnumerator();
         while (objEnum.hasMoreElements()) {
           eoful.addObject(ERXEOControlUtilities.convertGIDtoEO(editingContext, objEnum.nextElement()));
         }
         result = eoful;
       }
View Full Code Here

       }
     }
     else if (obj instanceof NSSet) {
       NSSet gidful = (NSSet)obj;
       boolean allGIDs = true;
       Enumeration objEnum = gidful.objectEnumerator();
       while (allGIDs && objEnum.hasMoreElements()) {
         allGIDs = (objEnum.nextElement() instanceof EOGlobalID);
       }
       if (allGIDs) {
         result = new NSSet(ERXEOGlobalIDUtilities.fetchObjectsWithGlobalIDs(editingContext, gidful.allObjects()));
View Full Code Here

       if (allGIDs) {
         result = new NSSet(ERXEOGlobalIDUtilities.fetchObjectsWithGlobalIDs(editingContext, gidful.allObjects()));
       }
       else {
         NSMutableSet eoful = new NSMutableSet();
         objEnum = gidful.objectEnumerator();
         while (objEnum.hasMoreElements()) {
           eoful.addObject(ERXEOControlUtilities.convertGIDtoEO(editingContext, objEnum.nextElement()));
         }
         result = eoful;
       }
View Full Code Here

        super.takeValuesFromRequest(r, c);
        NSMutableArray result = new NSMutableArray();
        NSArray hiddenFieldValues = NSArray.componentsSeparatedByString(chosenKeyPaths, ",");
        if(log.isDebugEnabled()) log.debug("hiddenFieldValues = "+hiddenFieldValues);
        if(hiddenFieldValues != null){
            for(Enumeration e = hiddenFieldValues.objectEnumerator(); e.hasMoreElements();){
                String keyPath = (String)e.nextElement();
                if(log.isDebugEnabled()) log.debug("keyPath = "+keyPath);
                if(keyPath.length()>0)
                    result.addObject(keyPath);
            }
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.