Package org.apache.myfaces.tobago.component

Examples of org.apache.myfaces.tobago.component.UIMenuItem


  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UIMenuItem component = (UIMenuItem) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (actionListener != null) {
      component.addActionListener(new javax.faces.event.MethodExpressionActionListener(actionListener));
    }
    if (accessKey != null) {
      if (!accessKey.isLiteralText()) {
        component.setValueExpression("accessKey", accessKey);
      } else {
        component.setAccessKey(accessKey.getExpressionString().charAt(0));
      }
    }
    if (labelWithAccessKey != null) {
      component.setValueExpression("labelWithAccessKey", labelWithAccessKey);
    }

    if (link != null) {
      component.setValueExpression("link", link);
    }

    if (jsfResource != null) {
      if (!jsfResource.isLiteralText()) {
        component.setValueExpression("jsfResource", jsfResource);
      } else {
        component.setJsfResource(Boolean.parseBoolean(jsfResource.getExpressionString()));
      }
    }
    if (resource != null) {
      component.setValueExpression("resource", resource);
    }

    if (image != null) {
      component.setValueExpression("image", image);
    }

    if (transition != null) {
      if (!transition.isLiteralText()) {
        component.setValueExpression("transition", transition);
      } else {
        component.setTransition(Boolean.parseBoolean(transition.getExpressionString()));
      }
    }
    if (label != null) {
      component.setValueExpression("label", label);
    }

    if (immediate != null) {
      if (!immediate.isLiteralText()) {
        component.setValueExpression("immediate", immediate);
      } else {
        component.setImmediate(Boolean.parseBoolean(immediate.getExpressionString()));
      }
    }
    if (action != null) {
      component.setActionExpression(action);
    }
    if (target != null) {
      component.setValueExpression("target", target);
    }

    if (renderedPartially != null) {
      if (!renderedPartially.isLiteralText()) {
        component.setValueExpression("renderedPartially", renderedPartially);
      } else {
        component.setRenderedPartially(splitList(renderedPartially.getExpressionString()));
      }
    }
    if (onclick != null) {
      component.setValueExpression("onclick", onclick);
    }

    if (disabled != null) {
      if (!disabled.isLiteralText()) {
        component.setValueExpression("disabled", disabled);
      } else {
        component.setDisabled(Boolean.parseBoolean(disabled.getExpressionString()));
      }
    }
  }
View Full Code Here


  }

  @Override
  protected void setProperties(final UIComponent uiComponent) {
    super.setProperties(uiComponent);
    final UIMenuItem component = (UIMenuItem) uiComponent;
    final FacesContext context = FacesContext.getCurrentInstance();
    final Application application = context.getApplication();
    if (actionListener != null) {
      component.addActionListener(new javax.faces.event.MethodExpressionActionListener(actionListener));
    }
    if (accessKey != null) {
      if (!accessKey.isLiteralText()) {
        component.setValueExpression("accessKey", accessKey);
      } else {
        component.setAccessKey(accessKey.getExpressionString().charAt(0));
      }
    }
    if (link != null) {
      component.setValueExpression("link", link);
    }

    if (labelWithAccessKey != null) {
      component.setValueExpression("labelWithAccessKey", labelWithAccessKey);
    }

    if (jsfResource != null) {
      if (!jsfResource.isLiteralText()) {
        component.setValueExpression("jsfResource", jsfResource);
      } else {
        component.setJsfResource(Boolean.parseBoolean(jsfResource.getExpressionString()));
      }
    }
    if (resource != null) {
      component.setValueExpression("resource", resource);
    }

    if (image != null) {
      component.setValueExpression("image", image);
    }

    if (transition != null) {
      if (!transition.isLiteralText()) {
        component.setValueExpression("transition", transition);
      } else {
        component.setTransition(Boolean.parseBoolean(transition.getExpressionString()));
      }
    }
    if (label != null) {
      component.setValueExpression("label", label);
    }

    if (immediate != null) {
      if (!immediate.isLiteralText()) {
        component.setValueExpression("immediate", immediate);
      } else {
        component.setImmediate(Boolean.parseBoolean(immediate.getExpressionString()));
      }
    }
    if (action != null) {
      component.setActionExpression(action);
    }
    if (target != null) {
      component.setValueExpression("target", target);
    }

    if (renderedPartially != null) {
      if (!renderedPartially.isLiteralText()) {
        component.setValueExpression("renderedPartially", renderedPartially);
      } else {
        component.setRenderedPartially(splitList(renderedPartially.getExpressionString()));
      }
    }
    if (onclick != null) {
      component.setValueExpression("onclick", onclick);
    }

    if (disabled != null) {
      if (!disabled.isLiteralText()) {
        component.setValueExpression("disabled", disabled);
      } else {
        component.setDisabled(Boolean.parseBoolean(disabled.getExpressionString()));
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.tobago.component.UIMenuItem

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.