Package com.webobjects.appserver

Examples of com.webobjects.appserver.WOAssociation


  @SuppressWarnings("unchecked")
  protected static NSDictionary processAssociations(NSDictionary associations, WOElement template) {
    NSMutableDictionary mutableAssociations = (NSMutableDictionary) associations;
    mutableAssociations.setObjectForKey(new WOConstantValueAssociation("backButton"), "id");
    WOAssociation classAssociation = (WOAssociation) mutableAssociations.objectForKey("class");
    mutableAssociations.setObjectForKey(new ERXProxyAssociation(classAssociation, "button transitionPrevious ", null, true), "class");
    if (!associations.containsKey("string") && template == null) {
      mutableAssociations.setObjectForKey(new WOConstantValueAssociation("Back"), "string");
    }
    return mutableAssociations;
View Full Code Here


  }

  @SuppressWarnings("unchecked")
  protected static NSDictionary processAssociations(NSDictionary associations, WOElement template) {
    NSMutableDictionary mutableAssociations = (NSMutableDictionary) associations;
    WOAssociation classAssociation = (WOAssociation) mutableAssociations.objectForKey("class");
    mutableAssociations.setObjectForKey(new ERXProxyAssociation(classAssociation, "transitionNext", null, true), "class");
    return mutableAssociations;
  }
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  protected static NSDictionary processAssociations(NSDictionary associations, WOElement template) {
    NSMutableDictionary mutableAssociations = (NSMutableDictionary) associations;
    WOAssociation classAssociation = (WOAssociation) mutableAssociations.objectForKey("class");
    mutableAssociations.setObjectForKey(new ERXProxyAssociation(classAssociation, "transitionPrevious", null, true), "class");
    return mutableAssociations;
  }
View Full Code Here

    return "password";
  }
 
  @Override
  protected boolean isDisabledInContext(WOContext context) {
    WOAssociation disabled = (WOAssociation) ERXKeyValueCodingUtilities.privateValueForKey(this, "_disabled");
    return disabled != null && disabled.booleanValueInComponent(context.component());
  }
View Full Code Here

            throw new WODynamicElementCreationException("<" + getClass().getName() + "> Either 'action' and 'directActionName' both exist, or 'action' and 'actionClass' both exist ");
    }

    @Override
    protected boolean isDisabledInContext(WOContext context) {
      WOAssociation disabled = (WOAssociation) ERXKeyValueCodingUtilities.privateValueForKey(this, "_disabled");
      return disabled != null && disabled.booleanValueInComponent(context.component());
    }
View Full Code Here

  public WOActionResults invokeAction(WORequest worequest, WOContext wocontext) {
    WOActionResults results = super.invokeAction(worequest, wocontext);
    if (results != null && _pageName != null) {
      WOComponent component = wocontext.component();
      for (String bindingName : _bindingAssociations.allKeys()) {
        WOAssociation association = _bindingAssociations.objectForKey(bindingName);
        Object value = association.valueInComponent(component);
        NSKeyValueCoding.Utility.takeValueForKey(results, value, bindingName);
      }
    }
    return results;
  }
View Full Code Here

  public static NSMutableDictionary _queryParametersInComponent(NSMutableDictionary associations, WOComponent component) {
    NSMutableDictionary queryParameters = new NSMutableDictionary();
    Enumeration keyEnum = associations.keyEnumerator();
    while (keyEnum.hasMoreElements()) {
      String key = (String) keyEnum.nextElement();
      WOAssociation association = (WOAssociation) associations.valueForKey(key);
      Object associationValue = association.valueInComponent(component);
      if (associationValue != null) {
        queryParameters.setObjectForKey(associationValue, key.substring(1));
      }
    }
    return queryParameters;
View Full Code Here

    NSMutableDictionary<String, WOAssociation> queryParameterAssociations = new NSMutableDictionary<String, WOAssociation>();
    Enumeration keyEnum = associations.keyEnumerator();
    while (keyEnum.hasMoreElements()) {
      String key = (String) keyEnum.nextElement();
      if (key.startsWith("?")) {
        WOAssociation association = (WOAssociation) associations.valueForKey(key);
        if (mutableAssociations != null) {
          mutableAssociations.removeObjectForKey(key);
        }
        queryParameterAssociations.setObjectForKey(association, key);
      }
View Full Code Here

   * @param component
   *            the component to evaluate the associations within
   */
  public static void appendHtmlAttributes(NSDictionary<String, WOAssociation> associations, WOResponse response, WOComponent component) {
    for (String key : associations.allKeys()) {
      WOAssociation association = associations.objectForKey(key);
      ERXComponentUtilities.appendHtmlAttribute(key, association, response, component);
    }
  }
View Full Code Here

    if (excludeKeys == null) {
      excludeKeys = NSArray.EmptyArray;
    }
    for (String key : associations.allKeys()) {
      if (!excludeKeys.contains(key)) {
        WOAssociation association = associations.objectForKey(key);
        ERXComponentUtilities.appendHtmlAttribute(key, association, response, component);
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.webobjects.appserver.WOAssociation

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.