Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSArray$Operator


     * @return the applied properties
     */
    public static Properties applyConfiguration(Properties source, Properties commandLine) {

      Properties dest = source != null ? (Properties) source.clone() : new Properties();
      NSArray additionalConfigurationFiles = ERXProperties.pathsForUserAndBundleProperties(false);

      if (additionalConfigurationFiles.count() > 0) {
        for (Enumeration configEnumerator = additionalConfigurationFiles.objectEnumerator(); configEnumerator.hasMoreElements();) {
          String configFile = (String)configEnumerator.nextElement();
          File file = new File(configFile);
          if (file.exists() && file.isFile() && file.canRead()) {
            try {
              Properties props = ERXProperties.propertiesFromFile(file);
View Full Code Here


    super.sleep();
    _list = null;
  }

  public NSArray list() {
    NSArray list = (NSArray) valueForBinding("list");
    if (_list == null || !_list.equals(list)) {
      _list = list;
      if (!ERXComponentUtilities.booleanValueForBinding(this, "mandatory", true)) {
        NSMutableArray optionList = _list.mutableClone();
        optionList.insertObjectAtIndex(NSKeyValueCoding.NullValue, 0);
View Full Code Here

    }
    return _value;
  }

  public int selectedIndex() {
    NSArray list = list();
    int selectedIndex;
    Object selection = selection();
    if (selection == null) {
      selectedIndex = -1;
    }
    else {
      selectedIndex = list.indexOfObject(selection);
    }
    return selectedIndex;
  }
View Full Code Here

      if (_value == null) {
        setSelection(null);
      }
      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

     * </span>
     */
    @SuppressWarnings("javadoc")
  public static String pathForPropertiesUnderProjectPath(String projectPath) {
        String path = null;
        final NSArray supportedPropertiesPaths = new NSArray(new Object[]
                                        {"/Properties", "/Resources/Properties"});
        Enumeration e = supportedPropertiesPaths.objectEnumerator();
        while (e.hasMoreElements()) {
            File file = new File(projectPath + (String) e.nextElement());
            if (file.exists()  &&  file.isFile()  &&  file.canRead()) {
                try {
                    path = file.getCanonicalPath();
View Full Code Here

     *   @return オプションで定義セットアップファイルの配列
     * </span>
     */
    @SuppressWarnings("javadoc")
  public static NSArray optionalConfigurationFiles() {
      NSArray immutableOptionalConfigurationFiles = arrayForKey("er.extensions.ERXProperties.OptionalConfigurationFiles");
      NSMutableArray optionalConfigurationFiles = null;
      if (immutableOptionalConfigurationFiles != null) {
        optionalConfigurationFiles = immutableOptionalConfigurationFiles.mutableClone();
        for (int i = 0; i < optionalConfigurationFiles.count(); i ++) {
          String optionalConfigurationFile = (String)optionalConfigurationFiles.objectAtIndex(i);
          if (!new File(optionalConfigurationFile).exists()) {
              String resourcePropertiesPath = ERXFileUtilities.pathForResourceNamed(optionalConfigurationFile, "app", null);
              if (resourcePropertiesPath != null) {
View Full Code Here

     * @param template the graph of elements passed to the constructor.
     */
    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

        return destinationDisplayKey;
    }

    public EOEntity entityWithEntityAndKeyPath(EOEntity entity, String keyPath) {
        NSArray keys = NSArray.componentsSeparatedByString(keyPath, ".");
        Enumeration keysEnumerator = keys.objectEnumerator();
        String key = null;
        EOEntity result = entity;

        while (keysEnumerator.hasMoreElements()) {
            key = (String) keysEnumerator.nextElement();
View Full Code Here

    *  -selections and -setSelections: are called by WOF when
    * syncing up the contents of this component.  These are
    * accessed only through the declarations.
    */
    public void setSelections(NSArray aValue) {
        NSArray aTempValue = aValue;

        // set selections to null if it's an empty array
        if (aValue == null || aValue.count() == 0) {

            if (isMandatory() && theList().count() > 0) {
View Full Code Here

            Object o = _context.valueForKey(key);
            if(o != null)
                dictionary.setObjectForKey(o, key);
        }
        String path = "components." + dictionary.objectForKey("componentName") + ".editors";
        NSArray keys = (NSArray)_allKeys.valueForKeyPath(path);
        if(keys != null) {
            for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) {
                String key = (String)e.nextElement();
                Object o = _context.valueForKey(key);
                if(o != null)
                    dictionary.setObjectForKey(o, key);
            }
        }
        path = "components." + dictionary.objectForKey("componentName") + ".supports";
        keys = (NSArray)_allKeys.valueForKeyPath(path);
        if(keys != null) {
            for(Enumeration e = keys.objectEnumerator(); e.hasMoreElements(); ) {
                String key = (String)e.nextElement();
                Object o = _context.valueForKey(key);
                if(o != null)
                    dictionary.setObjectForKey(o, key);
            }
View Full Code Here

TOP

Related Classes of com.webobjects.foundation.NSArray$Operator

Copyright © 2018 www.massapicom. 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.