Package com.webobjects.appserver._private

Examples of com.webobjects.appserver._private.WOConstantValueAssociation


      if (localWOElement == null) {
        localWOElement = WOApplication.application().dynamicElementWithName(name, componentAttributes, template, paramWOContext._languages());

        if (localWOElement == null) {
          throw new WODynamicElementCreationException("<" + getClass().getName() + "> : cannot find component or dynamic element named " + name);
        }

        componentCache.setObjectForKey(localWOElement, elementID);
      }
    }
View Full Code Here


    _size = _associations.removeObjectForKey("size");
    String suffix = (isBrowser() ? "s" : "");
    _selections = _associations.removeObjectForKey("selection" + suffix);
    _selectedValues = _associations.removeObjectForKey("selectedValue" + suffix);
    if (_list == null || (_value != null || _displayString != null) && (_item == null || !_item.isValueSettable()) || _selections != null && !_selections.isValueSettable()) {
      throw new WODynamicElementCreationException("<" + getClass().getName() + "> : Invalid attributes: 'list' must be present. 'item' must not be a constant if 'value' is present.  Cannot have 'displayString' or 'value' without 'item'.  'selection' must not be a constant if present. 'value' is not allowed anymore.");
    }
    if (_selections != null && _selectedValues != null) {
      throw new WODynamicElementCreationException("<" + getClass().getName() + "> : Cannot have both selections and selectedValues.");
    }
  }
View Full Code Here

  protected WOAssociation _readonly;

  public ERXWOTextField(String tagname, NSDictionary nsdictionary, WOElement woelement) {
    super("input", nsdictionary, woelement);
    if(_value == null || !_value.isValueSettable())
      throw new WODynamicElementCreationException("<" + getClass().getName() + "> 'value' attribute not present or is a constant");
   
    _formatter = _associations.removeObjectForKey("formatter");
    _dateFormat = _associations.removeObjectForKey("dateformat");
    _numberFormat = _associations.removeObjectForKey("numberformat");
    _useDecimalNumber = _associations.removeObjectForKey("useDecimalNumber");
    _blankIsNull = _associations.removeObjectForKey("blankIsNull");
    _readonly = _associations.removeObjectForKey("readonly");
   
    if(_dateFormat != null && _numberFormat != null) {
      throw new WODynamicElementCreationException("<" + getClass().getName() + "> Cannot have 'dateFormat' and 'numberFormat' attributes at the same time.");
    }
  }
View Full Code Here

  public ERXUniquingWrapper(String name, NSDictionary associations, WOElement template) {
    super(name, associations, template);
    _id = (WOAssociation) ((NSMutableDictionary) associations).removeObjectForKey("id");
    if(_id == null) {
      throw new WODynamicElementCreationException("ERXUniquingWrapper needs an 'id' binding." );
    }
  }
View Full Code Here

  public ERXRRLoopDebug(String name, NSDictionary associations, WOElement template) {
    super(name, associations, template);
    _name = (WOAssociation) associations.objectForKey("name");
   
    if (_name == null) {
      throw new WODynamicElementCreationException("'name' is a required binding.");
    }
  }
View Full Code Here

  public ERXSwitchEmbeddedPage(String name, NSDictionary<String, WOAssociation> associations, WOElement template) {
    super(null, null, null);
    _initialComponentName = associations.objectForKey("initialComponentName");
    if (_initialComponentName == null) {
      throw new WODynamicElementCreationException("initialComponentName is a required attribute.");
    }
    _componentAttributes = associations.mutableClone();
    _componentAttributes.removeObjectForKey("initialComponentName");

    _componentCache = new NSMutableDictionary<String, WOElement>();
View Full Code Here

    synchronized (this) {
      woelement = _componentCache.objectForKey(s);
      if (woelement == null) {
        woelement = WOApplication.application().dynamicElementWithName(s, _componentAttributes, _template, wocontext._languages());
        if (woelement == null) {
          throw new WODynamicElementCreationException("<" + getClass().getName() + "> : cannot find component or dynamic element named " + s);
        }
        _componentCache.setObjectForKey(woelement, s);
      }
    }
    return woelement;
View Full Code Here

  public UJACResource(String name, NSDictionary<String, WOAssociation> associations, WOElement template) {
    super(name, associations, template);
    _source = _associations.removeObjectForKey("source");
    _framework = _associations.removeObjectForKey("framework");
    if(_source == null) {
      throw new WODynamicElementCreationException("'source' must be bound: " + this);
    }
  }
View Full Code Here

    WOAssociation onclick = _associations.objectForKey("onclick");
    if (onclick == null) {
      onclick = _associations.objectForKey("onClick");
    }
    if (onclick != null && _action != null) {
      throw new WODynamicElementCreationException("You cannot bind both 'action' and 'onclick' at the same time.");
    }
    if (_updateContainerID != null && _action == null) {
      throw new WODynamicElementCreationException("If you bind 'updateContainerID', you must also bind 'action'.");
    }
  }
View Full Code Here

  @Override
  protected void pullAssociations(NSDictionary<String, ? extends WOAssociation> dict) {
    _key = dict.objectForKey("key");
    _value = dict.objectForKey("value");
    if (_key == null || _value == null) {
      throw new WODynamicElementCreationException("key and value must be bound");
    }
  }
View Full Code Here

TOP

Related Classes of com.webobjects.appserver._private.WOConstantValueAssociation

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.