Examples of objectEnumerator()


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

            }
        }
        path = "components." + dictionary.objectForKey("componentName") + ".supports";
        keys = (NSArray)_allKeys.valueForKeyPath(path);
        if(keys != null) {
            for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) {
                String key = (String)e.nextElement();
                Object o = _context.valueForKey(key);
                if(o != null)
                    dictionary.setObjectForKey(o, key);
            }
View Full Code Here

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

    }
   
    public WOComponent selectAll() {
        NSMutableArray selectedObjects = new NSMutableArray();
        NSArray list = filteredObjects();
        for (Enumeration e = list.objectEnumerator(); e.hasMoreElements();) {
            selectedObjects.addObject(e.nextElement());
        }
        setSelectedObjects(selectedObjects);
        return context().page();
    }
View Full Code Here

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

    }
   
    public WOComponent selectAllOnPage() {
        NSMutableArray selectedObjects = new NSMutableArray();
        NSArray list = displayGroup().displayedObjects();
        for (Enumeration e = list.objectEnumerator(); e.hasMoreElements();) {
            selectedObjects.addObject(e.nextElement());
        }
        setSelectedObjects(selectedObjects);
        return context().page();
    }
View Full Code Here

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

            //to what has been changed by the javascript in the WOBrowser
            NSArray hiddenFieldValues = NSArray.componentsSeparatedByString(sortedObjects, ",");
            if(log.isDebugEnabled()) log.debug("hiddenFieldValues = "+hiddenFieldValues);
            if(hiddenFieldValues != null){
                int i = 0;
                for(Enumeration e = hiddenFieldValues.objectEnumerator(); e.hasMoreElements();){
                    String objectForHashCode = (String)e.nextElement();
                    if(log.isDebugEnabled()) log.debug("objectForHashCode = "+objectForHashCode);
                    EOEnterpriseObject eo = objectForHashCode(objectForHashCode);
                    if(eo!=null){
                        eo.takeValueForKey(ERXConstant.integerForInt(i), indexKey());
View Full Code Here

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

        if (_destinationRelationship==null) {
            NSArray joinRelationships = ERDSortedManyToManyAssignment.joinRelationshipsForJoinEntity(entity());

            String originEntityName=object().entityName();
            //General case
            for (Enumeration e=joinRelationships.objectEnumerator(); e.hasMoreElements();) {
                EORelationship r=(EORelationship)e.nextElement();
                if (!originEntityName.equals(r.destinationEntity().name())) {
                    _destinationRelationship=r;
                    break;
                }
View Full Code Here

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

            // In the case we have a self join relationship we have to be more clever
            if(_destinationRelationship==null){
                EOEntity originEntity = EOModelGroup.defaultGroup().entityNamed(originEntityName);
                EORelationship originRelationship = originEntity.relationshipNamed(relationshipKey());
                EORelationship inverseOriginRelationship = originRelationship.inverseRelationship();
                for (Enumeration e=joinRelationships.objectEnumerator(); e.hasMoreElements();) {
                    EORelationship r=(EORelationship)e.nextElement();
                    if (r!=inverseOriginRelationship) {
                        _destinationRelationship=r;
                        break;
                    }
View Full Code Here

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

        NSArray arr = NSArray.componentsSeparatedByString(value.name(), ".");
        String prefix = "ERXAssert.instances";
        String level = System.getProperty(prefix);
        if(level == null)
            level = "LOG";
        for(Enumeration e = arr.objectEnumerator(); e.hasMoreElements(); ) {
            String s = (String)e.nextElement();
            String possibleLevel = System.getProperty(prefix + "." + s);
            if(possibleLevel != null) {
                level = possibleLevel;
            }
View Full Code Here

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

  private void createPrimaryKeySupportForModel(EOModel eomodel, EOAdaptorChannel channel, EOSynchronizationFactory syncFactory) {
    try {
      // AK: the (Object) cast is needed, because in 5.4 new NSArray(obj)
      // != new NSArray(array).
      NSArray pkSupportExpressions = syncFactory.primaryKeySupportStatementsForEntityGroups(new NSArray((Object) eomodel.entities()));
      Enumeration enumeration = pkSupportExpressions.objectEnumerator();
      while (enumeration.hasMoreElements()) {
        EOSQLExpression expression = (EOSQLExpression) enumeration.nextElement();
        channel.evaluateExpression(expression);
      }
    } catch (Exception e) {
View Full Code Here

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

    else if (type == AjaxOption.ARRAY) {
      if (_value instanceof NSArray) {
        NSArray arrayValue = (NSArray) _value;
        StringBuilder sb = new StringBuilder();
        sb.append('[');
        Enumeration objEnum = arrayValue.objectEnumerator();
        while (objEnum.hasMoreElements()) {
          Object o = objEnum.nextElement();
          sb.append(new AjaxValue(o).javascriptValue());
          if (objEnum.hasMoreElements()) {
            sb.append(',');
View Full Code Here

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

          strValue = new AjaxValue(AjaxOption.STRING, arrayValue.objectAtIndex(0)).javascriptValue();
        }
        else if (count > 0) {
          StringBuilder sb = new StringBuilder();
          sb.append('[');
          Enumeration objEnum = arrayValue.objectEnumerator();
          while (objEnum.hasMoreElements()) {
            Object o = objEnum.nextElement();
            sb.append(new AjaxValue(AjaxOption.STRING, o).javascriptValue());
            if (objEnum.hasMoreElements()) {
              sb.append(',');
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.