Package javax.faces.component

Examples of javax.faces.component.ActionSource.addActionListener()


    {
      ValueExpression valueExp = _value.getValueExpression(faceletContext, Object.class);
      ActionSource actionSource = (ActionSource)parent;
      ReturnActionListener listener = new ReturnActionListener();
      listener.setValueBinding(ReturnActionListener.VALUE_KEY, new LegacyValueBinding(valueExp));
      actionSource.addActionListener(listener);
    }
  }

  private final TagAttribute _value;
}
View Full Code Here


        ActionSource src = (ActionSource) parent;
        ValueExpression valueExpr = _value.getValueExpression(faceletContext, Object.class);
        ValueExpression targetExpr = _target.getValueExpression(faceletContext, Object.class);

        src.addActionListener(new SetPropertyListener(valueExpr, targetExpr));
    }

    /**
     * TODO: Document me!
     */
 
View Full Code Here

      // TODO Message resource i18n
      throw new JspException("Component " + component.getClass().getName() + " is not instanceof ActionSource");
    }
    ActionSource actionSource = (ActionSource) component;
    if (!isExecuteSet()) {
      actionSource.addActionListener(new ResetFormActionListener());
    } else if (isExecuteLiteral()) {
      actionSource.addActionListener(new ResetInputActionListener(ComponentUtils.splitList(getExecuteValue())));
    } else {
      FacesUtils.addBindingOrExpressionResetActionListener(actionSource, getExecuteAsBindingOrExpression());
    }
View Full Code Here

    }
    ActionSource actionSource = (ActionSource) component;
    if (!isExecuteSet()) {
      actionSource.addActionListener(new ResetFormActionListener());
    } else if (isExecuteLiteral()) {
      actionSource.addActionListener(new ResetInputActionListener(ComponentUtils.splitList(getExecuteValue())));
    } else {
      FacesUtils.addBindingOrExpressionResetActionListener(actionSource, getExecuteAsBindingOrExpression());
    }
    return (SKIP_BODY);
  }
View Full Code Here

    ActionSource actionSource = (ActionSource) component;

    component.setValueExpression(Attributes.FOR, forValue);

    if (forValue.isLiteralText()) {
      actionSource.addActionListener(new PopupActionListener(
          (String) forValue.getValue(FacesContext.getCurrentInstance().getELContext())));
    } else {
      component.setValueExpression(Attributes.FOR, forValue);
    }
    return (SKIP_BODY);
View Full Code Here

    final ELContext elContext = FacesContext.getCurrentInstance().getELContext();

    ActionSource actionSource = (ActionSource) component;
    if (execute == null) {
      actionSource.addActionListener(new ResetFormActionListener());
    } else if (execute.isLiteralText()) {
      actionSource.addActionListener(new ResetInputActionListener(
          ComponentUtils.splitList((String) execute.getValue(elContext))));
    } else {
      actionSource.addActionListener(new ValueExpressionResetInputActionListener(execute));
View Full Code Here

    ActionSource actionSource = (ActionSource) component;
    if (execute == null) {
      actionSource.addActionListener(new ResetFormActionListener());
    } else if (execute.isLiteralText()) {
      actionSource.addActionListener(new ResetInputActionListener(
          ComponentUtils.splitList((String) execute.getValue(elContext))));
    } else {
      actionSource.addActionListener(new ValueExpressionResetInputActionListener(execute));
    }
    return (SKIP_BODY);
View Full Code Here

      actionSource.addActionListener(new ResetFormActionListener());
    } else if (execute.isLiteralText()) {
      actionSource.addActionListener(new ResetInputActionListener(
          ComponentUtils.splitList((String) execute.getValue(elContext))));
    } else {
      actionSource.addActionListener(new ValueExpressionResetInputActionListener(execute));
    }
    return (SKIP_BODY);
  }

  @Override
View Full Code Here

      throws IOException, FacesException, ELException {
    if (parent instanceof ActionSource) {
      if (ComponentHandler.isNew(parent)) {
        ActionSource actionSource = (ActionSource) parent;
        if (execute == null) {
          actionSource.addActionListener(new ResetFormActionListener());
        } else if (execute.isLiteral())  {
          actionSource.addActionListener(new ResetInputActionListener(ComponentUtils.splitList(execute.getValue())));
        } else {
          ValueExpression forValueExpression = execute.getValueExpression(faceletContext, String.class);
          actionSource.addActionListener(new ValueExpressionResetInputActionListener(forValueExpression));
View Full Code Here

      if (ComponentHandler.isNew(parent)) {
        ActionSource actionSource = (ActionSource) parent;
        if (execute == null) {
          actionSource.addActionListener(new ResetFormActionListener());
        } else if (execute.isLiteral())  {
          actionSource.addActionListener(new ResetInputActionListener(ComponentUtils.splitList(execute.getValue())));
        } else {
          ValueExpression forValueExpression = execute.getValueExpression(faceletContext, String.class);
          actionSource.addActionListener(new ValueExpressionResetInputActionListener(forValueExpression));
        }
      }
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.