Examples of objectAtIndex()


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

        boolean didOpenOptionGroup = false;
        boolean shouldEscapeHTML = _escapeHTML != null ? _escapeHTML.booleanValueInComponent(parent) : true;
       
        for(int i = 0; i < list.count(); i++)
        {
             Object listItem = list.objectAtIndex(i);
             _item.setValue(listItem, parent);
            
             Object currentGroup = group.valueInComponent(parent);
             if ( ! currentGroup.equals(previousGroup))
             {
View Full Code Here

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

    if (canGetValueForBinding("startIndex")) {
      Number startIndexNumber = (Number) valueForBinding("startIndex");
      startIndex = startIndexNumber.intValue();
      if (!mutableList) {
        for (int i = 0; i < startIndex; i++) {
          reorderedList.addObject(list.objectAtIndex(i));
        }
      }
    }

    // Add the reordered objects
View Full Code Here

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

        throw new NoSuchElementException("There was no item that matched the ID '" + itemID + "' in " + list + ".");
      }
      else if (matchingItems.count() > 1) {
        throw new IllegalStateException("There was more than one item that matched the ID '" + itemID + "' in " + list + ".");
      }
      Object replacingItem = matchingItems.objectAtIndex(0);
      if (mutableList) {
        int replacedItemIndex = itemPageRange.location();
        Object replacedItem = reorderedList.objectAtIndex(replacedItemIndex);
        if (replacedItem != replacingItem) {
          int replacingItemIndex = replacedItemIndex + itemPageArray.indexOfObject(replacingItem);
View Full Code Here

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

                            tmp.addObject(currentValue);
                        }
                    } else {
                        NSArray current = (NSArray)e.nextElement();
                        ERD2WContainer c=new ERD2WContainer();
                        c.name = (String)current.objectAtIndex(0);
                        c.keys = current.mutableClone();
                        c.keys.removeObjectAtIndex(0);
                        result.addObject(c);
                    }
                }
View Full Code Here

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

    public NSArray compareList() {
        if (_compareList == null) {
            NSArray list = displayGroup().displayedObjects();
            _compareList = new NSMutableArray();
            if (list != null && list.count() > 0) {
                _compareList.addObject(list.objectAtIndex(0));
                Object o=comparisonObject();
                if (o!=null) _compareList.addObject(o);
                _compareList.addObjectsFromArray(list);
            }
        }
View Full Code Here

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

    public void setDefaultRelationshipValue(EORelationship rel, String defaultValue) {
        String name = rel.name();
        defaultLog.debug("Adding: " + name + "-" + defaultValue);
        NSArray attrs = rel.destinationAttributes();
        if(!rel.isFlattened() && attrs !=  null && attrs.count() == 1) {
            EOAttribute relAttr = (EOAttribute)attrs.objectAtIndex(0);
            if(defaultValue != null) {
                RelationshipDefault d = new RelationshipDefault(name, defaultValue, relAttr.adaptorValueType(), rel.destinationEntity().name());
                _initialDefaultValues.setObjectForKey(d, name);
            }
        }
View Full Code Here

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

      else {
        int index = Integer.parseInt(_value);
        NSArray list = list();
        Object selection = null;
        if (index >= 0 && index < list.count()) {
          selection = list.objectAtIndex(index);
        }
        if (selection instanceof NSKeyValueCoding.Null || selection == null) {
          selection = null;
        }
        setSelection(selection);
View Full Code Here

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

    private void findTabs(WODynamicGroup template)  {
      if (template == null || template.childrenElements() == null) return;

        NSArray children = template.childrenElements();
        for (int i = 0; i < children.count(); i++) {
            WOElement child = (WOElement)children.objectAtIndex(i);
            if (child instanceof AjaxTabbedPanelTab) {
              AjaxTabbedPanelTab childTab = (AjaxTabbedPanelTab)child;

              // The tabs need to have an id attribute so we assign one if needed
                if (childTab.id() == null) {
View Full Code Here

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

        if(_displayGroup == null) {
            ERXDateGrouper grouper = new ERXDateGrouper();
            _displayGroup = grouper;
            NSArray sortOrderings = sortOrderings();
            if(sortOrderings.count() > 0) {
                Object o = sortOrderings.objectAtIndex(0);
                if(o instanceof EOSortOrdering) {
                    grouper.setDateKeyPath(((EOSortOrdering)o).key());
                }
            }
        }
View Full Code Here

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

  public NSMutableDictionary columnsByKeypath() {
    if (columnsByKeypath == null) {
      NSArray columns = columns();
      columnsByKeypath = new NSMutableDictionary(columns.count());
      for (int i = 0; i < columns.count(); i++) {
        columnsByKeypath.setObjectForKey(columns.objectAtIndex(i), ((NSKeyValueCoding) columns.objectAtIndex(i)).valueForKey(KEY_PATH));
      }
    }

    return columnsByKeypath;
  }
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.