Package com.webobjects.appserver._private

Examples of com.webobjects.appserver._private.WOConstantValueAssociation


      else {
        updateContainerID = AjaxUpdateContainer.currentUpdateContainerID();
      }

      if (updateContainerID == null) {
        throw new WODynamicElementCreationException("You must either set the 'updateContainerID' binding or the link must be contained inside of an AjaxUpdateContainer.");
      }

      response.appendContentString(" onclick = \"");
      response.appendContentString(updateContainerID);
      if ("edit".equalsIgnoreCase(action)) {
        response.appendContentString("Edit");
      }
      else if ("cancel".equalsIgnoreCase(action)) {
        response.appendContentString("Cancel");
      }
      else if ("save".equalsIgnoreCase(action)) {
        response.appendContentString("Save");
      }
      else if ("update".equalsIgnoreCase(action)) {
        response.appendContentString("Update");
      }
      else {
        throw new WODynamicElementCreationException("Unknown AjaxInPlace action '" + action + "'.  Must be one of 'edit', 'cancel', 'save', or 'Update'.");
      }
      response.appendContentString("()\"");
    }
  }
View Full Code Here


   
    @Override
    protected String url() {
      if (hasBinding(Bindings.action) || hasBinding(Bindings.directActionName))
        return "this.href";
      else throw new WODynamicElementCreationException("Action or directActionName is a required binding");
    }
View Full Code Here

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

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

  // PROTOTYPE EFFECTS
  public static void addEffect(NSMutableDictionary options, String effect, String updateContainerID, String duration) {
    if (effect != null) {
      if (options.objectForKey("onSuccess") != null) {
        throw new WODynamicElementCreationException("You cannot specify both an effect and a custom onSuccess function.");
      }

      if (updateContainerID == null) {
        throw new WODynamicElementCreationException("You cannot specify an effect without an updateContainerID.");
      }
     
      StringBuilder effectBuffer = new StringBuilder();
      effectBuffer.append("function() { new " + AjaxUpdateLink.fullEffectName(effect) + "('" + updateContainerID + "', {  queue:'end'");
      if (duration != null) {
View Full Code Here

    _submit = _associations.removeObjectForKey("submit");
    _useIEConditionals = _associations.removeObjectForKey("useIEConditionals");
    _value = _associations.removeObjectForKey("value");
   
    if(_action == null && _href == null && _pageName == null && _directActionName == null && _actionClass == null) {
      throw new WODynamicElementCreationException(new StringBuilder().append('<').append(getClass().getName()).append("> Missing required attribute: 'action' or 'href' or 'pageName' or 'directActionName' or 'actionClass'").toString());
    }
    if(_action != null && _href != null || _action != null && _pageName != null || _href != null && _pageName != null || _action != null && _directActionName != null || _href != null && _directActionName != null || _pageName != null && _directActionName != null || _action != null && _actionClass != null) {
      throw new WODynamicElementCreationException(new StringBuilder().append('<').append(getClass().getName()).append("> At least two of these conflicting attributes are present: 'action', 'href', 'pageName', 'directActionName', 'actionClass'.").toString());
    }
    if(_action != null && _action.isValueConstant()) {
      throw new WODynamicElementCreationException(new StringBuilder().append('<').append(getClass().getName()).append("> 'action' is a constant.").toString());
   
  }
View Full Code Here

    boolean                 _shouldFormat;

    public ERXWOString(String s, NSDictionary nsdictionary, WOElement woelement) {
        super(null, null, null);
        _value = (WOAssociation) nsdictionary.objectForKey("value");
        if (_value == null) { throw new WODynamicElementCreationException("<" + getClass().getName()
                + "> ( no 'value' attribute specified."); }
        _valueWhenEmpty = (WOAssociation) nsdictionary.objectForKey("valueWhenEmpty");
        _escapeHTML = (WOAssociation) nsdictionary.objectForKey("escapeHTML");
        _dateFormat = (WOAssociation) nsdictionary.objectForKey("dateformat");
        _numberFormat = (WOAssociation) nsdictionary.objectForKey("numberformat");
        _formatter = (WOAssociation) nsdictionary.objectForKey("formatter");

        if (_dateFormat != null || _numberFormat != null || _formatter != null)
            _shouldFormat = true;
        else
            _shouldFormat = false;

        if ((_dateFormat != null && _numberFormat != null) || (_formatter != null && _dateFormat != null)
                || (_formatter != null && _numberFormat != null)) { throw new WODynamicElementCreationException("<" + getClass().getName()
                + "> ( cannot have 'dateFormat' and 'numberFormat' or 'formatter' attributes at the same time."); }
    }
View Full Code Here

    _scriptFramework = _associations.removeObjectForKey("scriptFramework");
    _framework = _associations.removeObjectForKey("framework");
    if((_scriptFile != null && _scriptString != null)
        || (_scriptFile != null && (_scriptSource != null || _filename != null))
        || (_scriptString != null && (_scriptSource != null || _filename != null))) {
      throw new WODynamicElementCreationException("<" + getClass().getName() + "> Only one of 'scriptFile' or 'scriptString' or 'scriptSource/filename' attributes can be specified.");
    }
    if (_scriptFramework != null && _framework != null) {
      throw new WODynamicElementCreationException("<" + getClass().getName() + "> Only one of 'scriptFramework' or 'framework' can be specified.");
    }
    if (_scriptSource != null && _filename != null) {
      throw new WODynamicElementCreationException("<" + getClass().getName() + "> Only one of 'scriptFile' or 'filename' can be specified.");
    }
  }
View Full Code Here

          java.net.URL url = WOApplication.application().resourceManager().pathURLForResourceNamed(filename, framework, wocontext._languages());
          if(url == null) {
            url = wocontext.component()._componentDefinition().pathURLForResourceNamed(filename, framework, wocontext._languages());
          }
          if(url == null) {
            throw new WODynamicElementCreationException("<" + getClass().getName() + "> : cannot find script file '" + filename + "'");
          }
          script = _NSStringUtilities.stringFromPathURL(url);
          if (ERXResourceManager._shouldGenerateCompleteResourceURL(wocontext)) {
            script = ERXResourceManager._completeURLForResource(script, null, wocontext);
          }
View Full Code Here

    _submit = _associations.removeObjectForKey("submit");
    _useIEConditionals = _associations.removeObjectForKey("useIEConditionals");
    _value = _associations.removeObjectForKey("value");
   
    if(_action == null && _href == null && _pageName == null && _directActionName == null && _actionClass == null) {
      throw new WODynamicElementCreationException(new StringBuilder().append('<').append(getClass().getName()).append("> Missing required attribute: 'action' or 'href' or 'pageName' or 'directActionName' or 'actionClass'").toString());
    }
    if(_action != null && _href != null || _action != null && _pageName != null || _href != null && _pageName != null || _action != null && _directActionName != null || _href != null && _directActionName != null || _pageName != null && _directActionName != null || _action != null && _actionClass != null) {
      throw new WODynamicElementCreationException(new StringBuilder().append('<').append(getClass().getName()).append("> At least two of these conflicting attributes are present: 'action', 'href', 'pageName', 'directActionName', 'actionClass'.").toString());
    }
    if(_action != null && _action.isValueConstant()) {
      throw new WODynamicElementCreationException(new StringBuilder().append('<').append(getClass().getName()).append("> 'action' is a constant.").toString());
   
  }
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.