Examples of indexOfObject()


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

    String result = null;
    Object item = valueForBinding("selectsItem");
    NSArray list = (NSArray) valueForBinding("list");
    String popupName = (String) valueForBinding("popupName");
    if (list != null && item != null) {
      int index = list.indexOfObject(item);
      if (index == -1) {
        log.info(item + " could not be found in " + list);
      }
      // by default we assume that there is one more item on top of the
      // list (i.e. - none - or - pick one -)
View Full Code Here

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

    Object selection = selection();
    if (selection == null) {
      selectedIndex = -1;
    }
    else {
      selectedIndex = list.indexOfObject(selection);
    }
    return selectedIndex;
  }

  @Override
View Full Code Here

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

        String result = key;
        if (result.indexOf(".") > 0) {
            NSArray propertyKeys = ERXValueUtilities.arrayValueWithDefault(d2wContext().valueForKey("displayPropertyKeys"), NSArray.EmptyArray);
            boolean found;
            do {
                found = propertyKeys.indexOfObject(result) > 0;
                if (!found) {
                    if (result.indexOf(".") > 0) {
                        result = ERXStringUtilities.keyPathWithoutLastProperty(result);
                    } else {
                        break;
View Full Code Here

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

        if (crt == null) {
            return "ERROR";
        }

        int index = srtdList.indexOfObject(crt);
        int srtdListCount = srtdList.count();


        if (index > srtdListCount-1) {
            crt = (DRCriteria)srtdList.objectAtIndex(srtdListCount-1);
View Full Code Here

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

    public WOComponent nextZ() {
        DRCriteria crt;
        NSArray srtdList = zGroup.sortedCriteriaList();
        DRMasterCriteria mc = zGroup.masterCriteria();
        int index = srtdList.indexOfObject(zCriteria().objectForKey(mc.label()));
        int count = srtdList.count();
        int newIndex = index+1;

        if (newIndex == count) {
            newIndex = 0;
View Full Code Here

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

    public WOComponent prevZ() {
        DRCriteria crt;
        NSArray srtdList = zGroup.sortedCriteriaList();
        DRMasterCriteria mc = zGroup.masterCriteria();
        int index = srtdList.indexOfObject(zCriteria().objectForKey(mc.label()));
        int count = srtdList.count();
        int newIndex = index-1;

        if (newIndex < 0) {
            newIndex = count-1;
View Full Code Here

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

        if (entityNameA.equals(entityNameB) && a.entity().parentEntity() != null) {
          entityNameA = entityNameFromAdaptorOperation(a);
          entityNameB = entityNameFromAdaptorOperation(b);
        }
       
        int aPriority = entityNames == null ? 0 : entityNames.indexOfObject(entityNameA);
        int bPriority = entityNames == null ? 0 : entityNames.indexOfObject(entityNameB);
      int order = 1;
      if(aPriority == bPriority) {
        order = 0;
      }
View Full Code Here

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

          entityNameA = entityNameFromAdaptorOperation(a);
          entityNameB = entityNameFromAdaptorOperation(b);
        }
       
        int aPriority = entityNames == null ? 0 : entityNames.indexOfObject(entityNameA);
        int bPriority = entityNames == null ? 0 : entityNames.indexOfObject(entityNameB);
      int order = 1;
      if(aPriority == bPriority) {
        order = 0;
      }
      else if(aPriority < bPriority) {
View Full Code Here

Examples of com.webobjects.foundation.NSMutableArray.indexOfObject()

    public WOComponent moveUpClicked() {
        handler().startReading();
        try {
            NSMutableArray nsmutablearray = applicationArray();
            int i = nsmutablearray.indexOfObject(currentApplication);
            nsmutablearray.removeObjectAtIndex(i);
            if (i == 0)
                nsmutablearray.addObject(currentApplication);
            else
                nsmutablearray.insertObjectAtIndex(currentApplication, i - 1);
View Full Code Here

Examples of com.webobjects.foundation.NSMutableArray.indexOfObject()

    public WOComponent moveDownClicked() {
        handler().startReading();
        try {
            NSMutableArray nsmutablearray = applicationArray();
            int i = nsmutablearray.indexOfObject(currentApplication);
            nsmutablearray.removeObjectAtIndex(i);
            if (i == nsmutablearray.count())
                nsmutablearray.insertObjectAtIndex(currentApplication, 0);
            else
                nsmutablearray.insertObjectAtIndex(currentApplication, i + 1);
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.