Examples of objectForKey()


Examples of com.webobjects.foundation.NSDictionary.objectForKey()

   */
  public static void updateDisplayGroupSort(WODisplayGroup dg, NSArray sortConfig) {
    NSMutableArray sortOrders = new NSMutableArray(sortConfig.count());
    for (int i = 0; i < sortConfig.count(); i++) {
      NSDictionary column = (NSDictionary) sortConfig.objectAtIndex(i);
      sortOrders.addObject(new ERXSortOrdering((String) column.objectForKey(KEY_PATH), (SORT_ASCENDING.equals(column.objectForKey(SORT_DIRECTION)) ? EOSortOrdering.CompareCaseInsensitiveAscending : EOSortOrdering.CompareCaseInsensitiveDescending)));
    }

    // Only set this if there has been an actual change to avoid discarding fetched objects
    if (! sortOrders.equals(dg.sortOrderings()) ) {
      dg.setSortOrderings(sortOrders);
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.objectForKey()

   */
  public static void updateDisplayGroupSort(WODisplayGroup dg, NSArray sortConfig) {
    NSMutableArray sortOrders = new NSMutableArray(sortConfig.count());
    for (int i = 0; i < sortConfig.count(); i++) {
      NSDictionary column = (NSDictionary) sortConfig.objectAtIndex(i);
      sortOrders.addObject(new ERXSortOrdering((String) column.objectForKey(KEY_PATH), (SORT_ASCENDING.equals(column.objectForKey(SORT_DIRECTION)) ? EOSortOrdering.CompareCaseInsensitiveAscending : EOSortOrdering.CompareCaseInsensitiveDescending)));
    }

    // Only set this if there has been an actual change to avoid discarding fetched objects
    if (! sortOrders.equals(dg.sortOrderings()) ) {
      dg.setSortOrderings(sortOrders);
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.objectForKey()

        StringBuilder sb = new StringBuilder();
        sb.append('{');
        Enumeration keyEnum = dictValue.keyEnumerator();
        while (keyEnum.hasMoreElements()) {
          Object key = keyEnum.nextElement();
          Object value = dictValue.objectForKey(key);
          sb.append(new AjaxValue(key).javascriptValue());
          sb.append(':');
          sb.append(new AjaxValue(value).javascriptValue());
          if (keyEnum.hasMoreElements()) {
            sb.append(',');
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.objectForKey()

    }
    public static class QualiferValidation implements EOQualifierEvaluation {
        protected EOQualifier qualifier;
        public QualiferValidation(Object info) {
            NSDictionary dict =(NSDictionary)info;
            qualifier = EOQualifier.qualifierWithQualifierFormat((String)dict.objectForKey("qualifier"), null);
        }
        public boolean evaluateWithObject(Object o) {
            return qualifier.evaluateWithObject(o);
        }
    }
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.objectForKey()

     */
    protected NSArray choiceByRemovingKeys(NSArray keys, NSArray choices) {
        NSMutableArray result = new NSMutableArray(choices.count());
        for (Enumeration e = choices.objectEnumerator(); e.hasMoreElements();) {
            NSDictionary choice = (NSDictionary) e.nextElement();
            if(!keys.containsObject(choice.objectForKey(BRANCH_NAME))) {
                result.addObject(choice);
            }
        }
        return result;
    }
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.objectForKey()

     */
    protected NSArray choiceByLeavingKeys(NSArray keys, NSArray choices) {
        NSMutableArray result = new NSMutableArray(choices.count());
        for (Enumeration e = choices.objectEnumerator(); e.hasMoreElements();) {
            NSDictionary choice = (NSDictionary) e.nextElement();
            if(keys.containsObject(choice.objectForKey(BRANCH_NAME))) {
                result.addObject(choice);
            }
        }
        return result;
    }
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.objectForKey()

            EOKeyGlobalID sourceGid = handler.sourceGlobalID();
            EOEditingContext ec = handler.editingContext();
            synchronized (cache) {
                NSDictionary entries = relationshipCacheEntriesForEntity(sourceGid.entityName(), handler.relationshipName());
                if(entries != null) {
                    NSArray gids = (NSArray) entries.objectForKey(sourceGid);
                    if(gids != null) {
                        NSMutableArray eos = new NSMutableArray(gids.count());
                        for (Enumeration enumerator = gids.objectEnumerator(); enumerator.hasMoreElements();) {
                            EOGlobalID gid = (EOGlobalID) enumerator.nextElement();
                            EOEnterpriseObject eo = ec.faultForGlobalID(gid, ec);
View Full Code Here

Examples of com.webobjects.foundation.NSMutableDictionary.objectForKey()

    ajaxOptionsArray.addObject(new AjaxOption("overlap", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("greedy", AjaxOption.BOOLEAN));
    ajaxOptionsArray.addObject(new AjaxOption("onHover", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("evalScripts", AjaxOption.BOOLEAN));
    NSMutableDictionary options = AjaxOption.createAjaxOptionsDictionary(ajaxOptionsArray, this);
  if (options.objectForKey("evalScripts") == null) {
    options.setObjectForKey("true", "evalScripts");
  }
    return options;
  }
View Full Code Here

Examples of com.webobjects.foundation.NSMutableDictionary.objectForKey()

    addScriptResourceInHead(res, "jsonrpc.js");

    NSMutableDictionary userInfo = ERXWOContext.contextDictionary();
    String name = (String) valueForBinding("name");
    String key = "JSONRPC_" + name;
    Object oldValue = userInfo.objectForKey(key);
    Object bridge = valueForBinding("JSONRPCBridge");
    if (bridge == null) {
      bridge = NSKeyValueCoding.NullValue;
    }
    if (oldValue == null) {
View Full Code Here

Examples of com.webobjects.foundation.NSMutableDictionary.objectForKey()

    String tagName;
    WODeclaration declaration;
    Enumeration rawDeclarationHeaderEnum = rawDeclarations.keyEnumerator();
    while (rawDeclarationHeaderEnum.hasMoreElements()) {
      String declarationHeader = (String) rawDeclarationHeaderEnum.nextElement();
      String declarationBody = (String) rawDeclarations.objectForKey(declarationHeader);
      int colonIndex = declarationHeader.indexOf(':');
      if (colonIndex < 0) {
        throw new WOHelperFunctionDeclarationFormatException("<WOHelperFunctionDeclarationParser> Missing ':' for declaration:\n" + declarationHeader + " " + declarationBody);
      }
      tagName = declarationHeader.substring(0, colonIndex).trim();
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.