Examples of ERXKeyValuePair


Examples of er.extensions.foundation.ERXKeyValuePair

        return null;
      }
      NSMutableArray result = new NSMutableArray();
      for(Enumeration e = array.objectEnumerator(); e.hasMoreElements(); ){
        String key = (String)e.nextElement();
        result.addObject(new ERXKeyValuePair(key, ERDirectToWeb.displayNameForPropertyKey(key, entityForReportName)));
      }
      return result;
    }
View Full Code Here

Examples of er.extensions.foundation.ERXKeyValuePair

                if(choices instanceof NSArray) {
                    for(Enumeration e = ((NSArray)choices).objectEnumerator(); e.hasMoreElements(); ) {
                        NSDictionary dict = (NSDictionary)e.nextElement();
                        String key = (String)dict.allKeys().lastObject();
                        String value = (String)dict.objectForKey(key);
                        keyChoices.addObject(new ERXKeyValuePair(key, ERXLocalizer.currentLocalizer().localizedStringForKeyWithDefault(value)));
                    }
                } else if(choices instanceof NSDictionary) {
                    NSArray keys = ((NSDictionary)choices).allKeys();
                    keys = ERXArrayUtilities.sortedArraySortedWithKey(keys, "toString");
                    for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) {
                        String key = (String)e.nextElement();
                        String value = (String)((NSDictionary)choices).objectForKey(key);
                        keyChoices.addObject(new ERXKeyValuePair(key, ERXLocalizer.currentLocalizer().localizedStringForKeyWithDefault(value)));
                    }
                }
                _availableElements = keyChoices;
            }
            if(_availableElements==null){
View Full Code Here

Examples of er.extensions.foundation.ERXKeyValuePair

        currentElement = null;
    }

    public ERXKeyValuePair selectedElement() {
        Object value = objectPropertyValue();
        ERXKeyValuePair selectedElement = null;
        for(Enumeration e = availableElements().objectEnumerator(); e.hasMoreElements() && selectedElement == null;) {
            ERXKeyValuePair current = (ERXKeyValuePair) e.nextElement();
            if(current.key().equals(value)) {
                selectedElement = current;
            }
        }
        return selectedElement;
    }
View Full Code Here

Examples of er.extensions.foundation.ERXKeyValuePair

        }
        return selectedElement;
    }
   
    public void setSelectedElement(Object value) {
        ERXKeyValuePair kvp  = (ERXKeyValuePair)value;
        if (kvp!=null) {
            object().validateTakeValueForKeyPath(kvp.key(), key());
        } else {
            object().validateTakeValueForKeyPath(null, key());
        }
   }
View Full Code Here

Examples of er.extensions.foundation.ERXKeyValuePair

                if(choices instanceof NSArray) {
                    for(Enumeration e = ((NSArray)choices).objectEnumerator(); e.hasMoreElements(); ) {
                        NSDictionary dict = (NSDictionary)e.nextElement();
                        String key = (String)dict.allKeys().lastObject();
                        String value = (String)dict.objectForKey(key);
                        keyChoices.addObject(new ERXKeyValuePair(key, ERXLocalizer.currentLocalizer().localizedStringForKeyWithDefault(value)));
                    }
                } else if(choices instanceof NSDictionary) {
                    NSArray keys = ((NSDictionary)choices).allKeys();
                    keys = ERXArrayUtilities.sortedArraySortedWithKey(keys, "toString");
                    for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) {
                        String key = (String)e.nextElement();
                        String value = (String)((NSDictionary)choices).objectForKey(key);
                        keyChoices.addObject(new ERXKeyValuePair(key, ERXLocalizer.currentLocalizer().localizedStringForKeyWithDefault(value)));
                    }
                }
                _choices = keyChoices;
            }
            if(log.isDebugEnabled()) log.debug("availableElements = "+_choices);
View Full Code Here

Examples of er.extensions.foundation.ERXKeyValuePair

        }
        String choice = (String) ERXLocalizer.currentLocalizer().valueForKey(value);
        if(choice == null) {
            choice = value;
        }
        return new ERXKeyValuePair(value, choice);       
    }
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.