Package javax.faces.component

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


                                                        Object.class,
                                                        _METHOD_PARAMS);
      listener.setMethod(me);

      ActionSource actionSource = (ActionSource)parent;
      actionSource.addActionListener(listener);
    }
  }

  static private final Class[] _METHOD_PARAMS =
    new Class[]{FacesContext.class, OutputStream.class};
View Full Code Here


  {
    if(ComponentHandler.isNew(parent))
    {
      ActionSource actionSource = (ActionSource)parent;
      ResetActionListener listener = new ResetActionListener();
      actionSource.addActionListener(listener);
    }
  }
}
View Full Code Here

      // TODO Message resource i18n
      throw new JspException("Component " + component.getClass().getName() + " is not instanceof ActionSource");
    }
    ActionSource actionSource = (ActionSource) component;
    if (isForLiteral()) {
      actionSource.addActionListener(new PopupActionListener(getForValue()));
    } else {
      FacesUtils.addBindingOrExpressionPopupActionListener(actionSource, getForAsBindingOrExpression());
    }
    return (SKIP_BODY);
  }
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

      throws IOException, FacesException, ELException {
    if (parent instanceof ActionSource) {
      if (ComponentSupport.isNew(parent)) {
        ActionSource actionSource = (ActionSource) parent;
        if (forComponent.isLiteral())  {
          actionSource.addActionListener(new PopupActionListener(forComponent.getValue()));
        } else {
          ValueExpression forValueExpression = forComponent.getValueExpression(faceletContext, String.class);
          if (FacesVersion.supports12()) {
            FacesUtils.addBindingOrExpressionPopupActionListener(actionSource, forValueExpression);
          } else {
View Full Code Here

      throws IOException, FacesException, ELException {
    if (parent instanceof ActionSource) {
      if (ComponentSupport.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);
          if (FacesVersion.supports12()) {
View Full Code Here

      if (ComponentSupport.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);
          if (FacesVersion.supports12()) {
            FacesUtils.addBindingOrExpressionResetActionListener(actionSource, forValueExpression);
          } else {
View Full Code Here

  public void apply(FaceletContext faceletContext, UIComponent parent)
      throws IOException, FacesException, ELException {
    if (parent instanceof ActionSource) {
      if (ComponentSupport.isNew(parent)) {
        ActionSource actionSource = (ActionSource) parent;
        actionSource.addActionListener(new PopupActionListener(forComponent.getValue()));
      }
    } else {
      throw new TagException(tag, "Parent is not of type ActionSource, type is: " + parent);
    }
  }
View Full Code Here

    if (!(component instanceof ActionSource)) {
      // TODO Message resource i18n
      throw new JspException("Component " + component.getClass().getName() + " is not instanceof ActionSource");
    }
    ActionSource actionSource = (ActionSource) component;
    actionSource.addActionListener(new PopupActionListener(forComponent));
    return (SKIP_BODY);
  }

  /**
   * <p>Release references to any acquired resources.
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.