Package com.webobjects.foundation

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


                   .editingContext()
                   : null);
            String entityName = (String) valueForBinding("entityName");
            if(entityName == null) {
                entityName = (nsarray != null && nsarray.count() > 0
                              ? ((EOEnterpriseObject) nsarray.objectAtIndex(0))
                              .entityName()
                              : null);
            }
            if(entityName != null) {
                if (_dataSource == null || !entityName.equals(_dataSource.classDescriptionForObjects().entityName()) || _dataSource.editingContext() != eoeditingcontext)
View Full Code Here


    }

    public EOSortOrdering _primaryOrdering() {
        NSArray anArray = _sortOrderingArray();
        if (anArray.count() > 0) {
            EOSortOrdering anOrdering = (EOSortOrdering)anArray.objectAtIndex(0);
            return anOrdering;
        }
        return null;
    }
View Full Code Here

    NSArray list = (NSArray) valueForBinding("list");
    int max = list.count();
    String cnt = "";
    boolean hasItem = hasBinding("item");
    for (int i = 0; i < max; i++) {
      Object ds = list.objectAtIndex(i);
      if (i > 0) {
        str.append(',');
      }
      str.append("\n\"");
      if (hasItem) {
View Full Code Here

            if (sectionsContentsFromRule==null) {
                sectionsContentsFromRule=displayPropertyKeys();
            }
            if (sectionsContentsFromRule == null)
                throw new RuntimeException("Couldn't find sectionsContents or displayPropertyKeys in d2wContext: " + d2wContext().valueForKey("pageConfiguration"));
            if(sectionsContentsFromRule.count() > 0 && !(sectionsContentsFromRule.objectAtIndex(0) instanceof ERD2WContainer))
                _sectionsContents = ERDirectToWeb.convertedPropertyKeyArray(sectionsContentsFromRule, '(', ')');
            else
                _sectionsContents = sectionsContentsFromRule.mutableClone();

        //}
View Full Code Here

                NSArray commandWotaskdResponse = (NSArray) responseDict.valueForKey("commandWotaskdResponse");
                if ((commandWotaskdResponse != null) && (commandWotaskdResponse.count() > 0)) {
                    int count = commandWotaskdResponse.count();
                    for (int j = 1; j < count; j++) {
                        NSDictionary aDict = (NSDictionary) commandWotaskdResponse.objectAtIndex(j);
                        String errorMessage = (String) aDict.valueForKey("errorMessage");
                        if (errorMessage != null) {
                            errorArray.addObject(errorMessage);
                            if (j == 0)
                                break; // the command produced an error,
View Full Code Here

                NSArray commandWotaskdResponse = (NSArray) responseDict.valueForKey("commandWotaskdResponse");
                if ((commandWotaskdResponse != null) && (commandWotaskdResponse.count() > 0)) {
                    int count = commandWotaskdResponse.count();
                    for (int j = 1; j < count; j++) {
                        NSDictionary aDict = (NSDictionary) commandWotaskdResponse.objectAtIndex(j);
                        String errorMessage = (String) aDict.valueForKey("errorMessage");
                        if (errorMessage != null) {
                            errorArray.addObject(errorMessage);
                            if (j == 0)
                                break; // the command produced an error,
View Full Code Here

                queryResponseDictionary = (NSDictionary) responseDictionary.valueForKey("queryWotaskdResponse");
                if (queryResponseDictionary != null) {
                    responseArray = (NSArray) queryResponseDictionary.valueForKey("instanceResponse");
                    if (responseArray != null) {
                        for (int j = 0; j < responseArray.count(); j++) {
                            responseDictionary = (NSDictionary) responseArray.objectAtIndex(j);

                            String host = (String) responseDictionary.valueForKey("host");
                            Integer port = (Integer) responseDictionary.valueForKey("port");
                            String runningState = (String) responseDictionary.valueForKey("runningState");
                            Boolean refusingNewSessions = (Boolean) responseDictionary
View Full Code Here

            applicationResponseDictionary = (NSDictionary) queryResponseDictionary.valueForKey("queryWotaskdResponse");
            if (applicationResponseDictionary != null) {
                responseArray = (NSArray) applicationResponseDictionary.valueForKey("applicationResponse");
                if (responseArray != null) {
                    for (int j = 0; j < responseArray.count(); j++) {
                        responseDictionary = (NSDictionary) responseArray.objectAtIndex(j);
                        String appName = (String) responseDictionary.valueForKey("name");
                        Integer runningInstances = (Integer) responseDictionary.valueForKey("runningInstances");
                        MApplication anApplication = siteConfig().applicationWithName(appName);
                        if (anApplication != null) {
                            anApplication.setRunningInstancesCount(anApplication.runningInstancesCount() + runningInstances.intValue());
View Full Code Here

        return result;
      }
        if(result.count() == 0) {
            return NSArray.EmptyArray;
        }
        ERD2WContainer pair = (ERD2WContainer) result.objectAtIndex(0);
      return new NSArray(pair);
    }
   
    public NSArray itemSectionsContents() {
      NSArray result = super.sectionsContents();
View Full Code Here

            context.setEntity(destinationEntity());
            sortOrderingDefinition = (NSArray)context.valueForKey("defaultSortOrdering");
            sortOrderingDefinitionCount = sortOrderingDefinition != null ? sortOrderingDefinition.count() : 0;

            while (i < sortOrderingDefinitionCount) {
                final String key = (String)sortOrderingDefinition.objectAtIndex(i++);
                final String selectorKey = (String)sortOrderingDefinition.objectAtIndex(i++);
                final EOSortOrdering sortOrdering = new EOSortOrdering(key, ERXArrayUtilities.sortSelectorWithKey(selectorKey));
                (sortOrderings != null ? sortOrderings : (sortOrderings = new NSMutableArray())).addObject(sortOrdering);
            }
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.