Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSMutableArray$Itr


   
    /*
     * An array of options for Ajax.Updater
     */
    protected NSArray<String> _options() {
      NSMutableArray _options = new NSMutableArray();
     
      // add options
      if (hasBinding(Bindings.method)) _options.add("method: '" + valueForBinding(Bindings.method) + "'");
      if (hasBinding(Bindings.evalScripts)) _options.add("evalScripts: " + evalScripts());
      if (hasBinding(Bindings.onSuccess)) _options.add("onSuccess: " + valueForBinding(Bindings.onSuccess));
      if (hasBinding(Bindings.onComplete)) _options.add("onComplete: " + valueForBinding(Bindings.onComplete));
      if (hasBinding(Bindings.onCreate)) _options.add("onCreate: " + valueForBinding(Bindings.onCreate));
      if (hasBinding(Bindings.onException)) _options.add("onException: " + valueForBinding(Bindings.onException));

      return _options.immutableClone();
    }
View Full Code Here


    public boolean synchronizesVariablesWithBindings() { return false; }

    @Override
    public void appendToResponse(WOResponse woresponse, WOContext wocontext) {
        super.appendToResponse(woresponse, wocontext);
        NSMutableArray array = (NSMutableArray)ERXWOContext.contextDictionary().objectForKey("elementArray");
        if(array != null)
            array.removeAllObjects();
    }
View Full Code Here

      throw new WODynamicElementCreationException("<" + getClass().getName() + "> Cannot have 'dateFormat' and 'numberFormat' attributes at the same time.");
    }
  }

  public NSDictionary createAjaxOptions(WOComponent component) {
    NSMutableArray ajaxOptionsArray = new NSMutableArray();
    ajaxOptionsArray.addObject(new AjaxOption("okButton", AjaxOption.BOOLEAN));
    ajaxOptionsArray.addObject(new AjaxOption("okText", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("cancelLink", AjaxOption.BOOLEAN));
    ajaxOptionsArray.addObject(new AjaxOption("cancelText", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("cancelControl", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("savingText", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("clickToEditText", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("formId", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("externalControl", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("rows", AjaxOption.NUMBER));
    ajaxOptionsArray.addObject(new AjaxOption("onComplete", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("onFailure", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("cols", AjaxOption.NUMBER));
    ajaxOptionsArray.addObject(new AjaxOption("size", AjaxOption.NUMBER));
    ajaxOptionsArray.addObject(new AjaxOption("highlightcolor", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("highlightendcolor", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("savingClassName", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("formClassName", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("loadTextURL", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("loadingText", AjaxOption.STRING));
    ajaxOptionsArray.addObject(new AjaxOption("callback", AjaxOption.SCRIPT));
    ajaxOptionsArray.addObject(new AjaxOption("submitOnBlur", AjaxOption.BOOLEAN));
    ajaxOptionsArray.addObject(new AjaxOption("valueWhenEmpty", AjaxOption.STRING));
    //ajaxOptionsArray.addObject(new AjaxOption("ajaxOptions", AjaxOption.SCRIPT));
    NSMutableDictionary options = AjaxOption.createAjaxOptionsDictionary(ajaxOptionsArray, component, associations());
    return options;
  }
View Full Code Here

   

    // accessors
    @Override
    protected NSArray<String> _options() {
      NSMutableArray _options = super._options().mutableClone();
     
      if (hasBinding(Bindings.method)) _options.add("method: '" + valueForBinding(Bindings.method) + "'");
      _options.add("parameters: this.form.serialize(true)");
     
      return _options.immutableClone();
    }
View Full Code Here

  public WOHTMLWebObjectTag parentTag() {
    return _parent;
  }

  public WOElement template() {
    NSMutableArray nsmutablearray = null;
    if (_children == null) {
      return null;
    }
    Enumeration enumeration = _children.objectEnumerator();
    if (enumeration != null) {
      nsmutablearray = new NSMutableArray(_children.count());
      StringBuilder stringbuffer = new StringBuilder(128);
      while (enumeration.hasMoreElements()) {
        Object obj1 = enumeration.nextElement();
        if (obj1 instanceof String) {
          stringbuffer.append((String) obj1);
        }
        else {
          if (stringbuffer.length() > 0) {
            WOHTMLBareString wohtmlbarestring1 = new WOHTMLBareString(stringbuffer.toString());
            nsmutablearray.addObject(wohtmlbarestring1);
            stringbuffer.setLength(0);
          }
          nsmutablearray.addObject(obj1);
        }
      }
      if (stringbuffer.length() > 0) {
        WOHTMLBareString wohtmlbarestring = new WOHTMLBareString(stringbuffer.toString());
        stringbuffer.setLength(0);
        nsmutablearray.addObject(wohtmlbarestring);
      }
    }
    WOElement obj = null;
    if (nsmutablearray != null && nsmutablearray.count() == 1) {
      Object obj2 = nsmutablearray.objectAtIndex(0);
      if (obj2 instanceof WOComponentReference) {
        obj = new WODynamicGroup(_name, null, (WOElement) obj2);
      }
      else {
        obj = (WOElement) obj2;
View Full Code Here

  private NSMutableArray _repeatingList;

  public NSArray repeatingList() {
    if (_repeatingList == null) {
      _repeatingList = new NSMutableArray();
      NSArray list = (NSArray) valueForBinding("list");
      Integer numberOfRepetetions = (Integer) valueForBinding("repetitions");
      if (numberOfRepetetions == null) {
        numberOfRepetetions = (Integer) valueForBinding("repetetions");
      }
View Full Code Here

    return obj;
  }

  public void addChildElement(Object obj) {
    if (_children == null) {
      _children = new NSMutableArray();
    }
    _children.addObject(obj);
  }
View Full Code Here

     */
    public NSArray maybeSortedList() {
        if (hasBinding(Keys.SortKey)) {
            String sortKey = (String)valueForBinding(Keys.SortKey);
            if (sortKey != null && sortKey.length() > 0) {
                NSMutableArray sortedList = new NSMutableArray(listFromBindings());
                ERXArrayUtilities.sortArrayWithKey(sortedList, sortKey);
                return sortedList;
            }
        }
        return listFromBindings();
View Full Code Here

     */
    public String selectionsString() {
        if (null == _selectionsString) {
            NSArray list = listFromBindings();
            NSArray selections = selectionsFromBindings();
            NSMutableArray indexes = new NSMutableArray();
            for (Enumeration selectionsEnum = selections.objectEnumerator(); selectionsEnum.hasMoreElements();) {
                Object aSelection = selectionsEnum.nextElement();
                int index = list.indexOfObject(aSelection);
                if (index >= 0) {
                    indexes.addObject(index);
                }
            }
            _selectionsString = indexes.componentsJoinedByString(", ");
        }
        return _selectionsString;
    }
View Full Code Here

    public void setSelectionsString(String value) {
        _selectionsString = value;

        if (_selectionsString != null && _selectionsString.trim().length() > 0) {
            NSArray list = list();
            NSMutableArray selections = new NSMutableArray();

            NSArray itemOffsets = NSArray.componentsSeparatedByString(_selectionsString, ", ");
            for (Enumeration offsetsEnum = itemOffsets.objectEnumerator(); offsetsEnum.hasMoreElements();) {
                String offsetString = (String)offsetsEnum.nextElement();
                int offset = ERXStringUtilities.integerWithString(offsetString);
                if (offset >= 0 && offset < list.count()) {
                    selections.addObject(list.objectAtIndex(offset));
                }
            }

            _selections = selections;
            pushSelectionsBinding(selections);
View Full Code Here

TOP

Related Classes of com.webobjects.foundation.NSMutableArray$Itr

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.