Examples of WOAssociation


Examples of com.webobjects.appserver.WOAssociation

  public WOActionResults handleRequest(WORequest request, WOContext context) {

    WOComponent component = context.component();
   
    WOResponse response = null;
    WOAssociation action = associations().objectForKey("action");
    if(action != null) {
      action.valueInComponent(component);
    }
   
    if(booleanValueForBinding("ajax", false, component) && hasChildrenElements()) {
      response = AjaxUtils.createResponse(request, context);
      AjaxUtils.setPageReplacementCacheKey(context, _containerID(context));
View Full Code Here

Examples of com.webobjects.appserver.WOAssociation

        setValueForBinding(extraBindings.objectForKey(key), key);
    } while (true);
  }

  private WOAssociation associationWithName(String name) {
    WOAssociation result = _keyAssociations.objectForKey(name);
    if (result == null) {
      NSLog.err.appendln(new StringBuilder().append("DirectToWeb - association with name ").append(name)
          .append(" not found on ").append(this).toString());
      throw new IllegalArgumentException(new StringBuilder().append("DirectToWeb - association with name ")
          .append(name).append(" not found on ").append(this).toString());
View Full Code Here

Examples of com.webobjects.appserver.WOAssociation

  /**
   * @deprecated use {@link er.extensions.components.ERXComponentUtilities#valueForBinding(String, NSDictionary, WOComponent)} instead
   */
  @Deprecated
  public static Object valueForBinding(String name, NSDictionary<String, WOAssociation> associations, WOComponent component) {
    WOAssociation association = associations.objectForKey(name);
    if (association != null) {
      return association.valueInComponent(component);
    }
    return null;
  }
View Full Code Here

Examples of com.webobjects.appserver.WOAssociation

  /**
   * @deprecated use {@link er.extensions.components.ERXComponentUtilities#booleanValueForBinding(String, boolean, NSDictionary, WOComponent)} instead
   */
  @Deprecated
  public static boolean booleanValueForBinding(String name, boolean defaultValue, NSDictionary<String, WOAssociation> associations, WOComponent component) {
    WOAssociation association = associations.objectForKey(name);
    if (association != null) {
      return association.booleanValueInComponent(component);
    }
    return defaultValue;
  }
View Full Code Here

Examples of com.webobjects.appserver.WOAssociation

  /**
   * @deprecated use {@link er.extensions.components.ERXComponentUtilities#setValueForBinding(Object, String, NSDictionary, WOComponent)} instead
   */
  @Deprecated
  public static void setValueForBinding(Object value, String name, NSDictionary<String, WOAssociation> associations, WOComponent component) {
    WOAssociation association = associations.objectForKey(name);
    if (association != null) {
      association.setValue(value, component);
    }
  }
View Full Code Here

Examples of com.webobjects.appserver.WOAssociation

          updateContainerID;
      }
      MTAjaxUpdateLink.addEffect(options, afterEffect, afterEffectID, property, start, duration, mode);
    }
       
    WOAssociation directActionNameAssociation = (WOAssociation) associations().valueForKey("directActionName");
   
    if(beforeEffect == null && updateContainerID != null && directActionNameAssociation == null && replaceID == null
         && function == null && onClick == null && onClickBefore == null) {
      NSDictionary nonDefaultOptions = MTAjaxUpdateContainer.removeDefaultOptions(options);
      onClickBuffer.append("MTAUL.")
      .append(generateFunctionWrapper ? "updateFunc" : "update")
      .append("('").append(updateContainerID).append("', ");
      AjaxOptions.appendToBuffer(nonDefaultOptions, onClickBuffer, context);
      onClickBuffer.append(", '").append(context.contextID()).append('.').append(context.elementID())
      .append('\'').append(')').append(';');

    } else {
         
      if(generateFunctionWrapper) {
        onClickBuffer.append("function(additionalParams) {");
      }
   
      if(onClickBefore != null) {
        onClickBuffer.append("if (")
        .append(onClickBefore)
        .append(") { ");
      }
     
      // EFFECTS
      if(beforeEffect != null) {
        String beforeEffectID = (String)valueForBinding("beforeEffectID", component);
        String beforeEffectDuration = (String) valueForBinding("beforeEffectDuration", component);
        String beforeEffectProperty = (String)valueForBinding("beforeEffectProperty", component);
        String beforeEffectStart = (String)valueForBinding("beforeEffectStart", component);

        if(beforeEffectID == null) {
          beforeEffectID = AjaxUpdateContainer.currentUpdateContainerID() != null ?
              AjaxUpdateContainer.currentUpdateContainerID() : updateContainerID;
        }
       
        if(beforeEffect.equals("tween")) {
          if(beforeEffectDuration != null) {
            onClickBuffer.append("$('").append(beforeEffectID)
            .append("').set('tween', { duration: '")
            .append(beforeEffectDuration).append("', property: '" + beforeEffectProperty + "' });");
          } else {
            onClickBuffer.append("$('").append(beforeEffectID).append("').set('tween', { property: '" + beforeEffectProperty + "' });");
          }
          onClickBuffer.append("$('").append(beforeEffectID).append("').get('tween').start(")
          .append(beforeEffectStart).append(").chain(function() {");
        } else if(beforeEffect.equals("morph")) {
          if(beforeEffectDuration != null) {
            onClickBuffer.append("$('").append(beforeEffectID).append("').set('morph', { duration: '").append(beforeEffectDuration).append("' });");
          }
          onClickBuffer.append("$('").append(beforeEffectID).append("').get('morph').start('." + beforeEffectStart + "'").append(").chain(function() {");
        } else if(beforeEffect.equals("slide")) {
          String mode = (String) valueForBinding("effectSlideMode", component);
          String transition = (String) valueForBinding("beforeEffectTransition", component);
          onClickBuffer.append("$('").append(beforeEffectID).append("').set('slide'");
          if(beforeEffectDuration != null || mode != null) {
            onClickBuffer.append(", { ");
            if(beforeEffectDuration != null) {
              onClickBuffer.append("duration: '").append(beforeEffectDuration).append('\'').append(mode != null || transition != null ? "," : "");
            }
            if(mode != null) {
              onClickBuffer.append("mode: '").append(mode).append('\'').append(transition != null ? "," : "");
            }
            if(transition != null) {
              onClickBuffer.append("transition: ").append(transition);
            }
            onClickBuffer.append('}');
          }
          onClickBuffer.append("); $('").append(beforeEffectID).append("').get('slide').slide").append(ERXStringUtilities.capitalize(beforeEffectProperty)).append("().chain(function() {");
        } else if(beforeEffect.equals("highlight")) {
          if(beforeEffectDuration != null) {
            onClickBuffer.append("$('").append(beforeEffectID)
            .append("').set('tween', { duration: '").append(beforeEffectDuration).append("', property: 'background-color'});");
          } else {
            onClickBuffer.append("$('").append(beforeEffectID)
            .append("').set('tween', { property: 'background-color' });");
          }
          onClickBuffer.append("$('").append(updateContainerID).append("').get('tween').start('").append(beforeEffectProperty != null ? beforeEffectProperty : "#ffff88', '#ffffff")
          .append("').chain(function() { ");
        }
      }
     
      String actionUrl = null;
      if(directActionNameAssociation != null) {
        actionUrl = context.directActionURLForActionNamed((String) directActionNameAssociation.valueInComponent(component), ERXComponentUtilities.queryParametersInComponent(associations(), component)).replaceAll("&amp;", "&");
      } else {
        actionUrl = AjaxUtils.ajaxComponentActionUrl(context);
      }
      actionUrl = "'" + actionUrl + "'";
View Full Code Here

Examples of com.webobjects.appserver.WOAssociation

  /**
   * @deprecated use {@link er.extensions.components.ERXComponentUtilities#stringValueForBinding(String, NSDictionary, WOComponent)} instead
   */
  @Deprecated
  public static String stringValueForBinding(String name, NSDictionary<String, WOAssociation> associations, WOComponent component) {
    WOAssociation association = associations.objectForKey(name);
    if (association != null) {
      return (String) association.valueInComponent(component);
    }
    return null;
  }
View Full Code Here

Examples of com.webobjects.appserver.WOAssociation

  }

  @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, "button transitionNext ", null, true), "class");
    return mutableAssociations;
  }
View Full Code Here

Examples of com.webobjects.appserver.WOAssociation

  }

  @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, "button leftButton ", null, true), "class");
    return mutableAssociations;
  }
View Full Code Here

Examples of com.webobjects.appserver.WOAssociation

  }

  @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, "button blueButton  ", null, true), "class");
    return mutableAssociations;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.