Package javax.faces.component

Examples of javax.faces.component.ActionSource


    }
    if (!(component instanceof ActionSource)) {
      // 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


    }
    if (!(component instanceof ActionSource)) {
      // 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());
    }
    return (SKIP_BODY);
  }
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;
        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

      if (e.getCause() != null) {
         FacesMessage facesMessage = new FacesMessage(e.getCause().toString());
         facesContext.addMessage(null, facesMessage);
      }
      UIComponent source = event.getComponent();
      ActionSource actionSource = (ActionSource) source;
      Application application = facesContext.getApplication();
      MethodBinding binding = actionSource.getAction();
      // Retrieve the NavigationHandler instance..
      NavigationHandler navHandler = application.getNavigationHandler();
      // Invoke nav handling..
      String navBinding = (null != binding) ? binding.getExpressionString() : null;
      navHandler.handleNavigation(facesContext, navBinding, errorOutcome);
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;
        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);
  }
View Full Code Here

      FacesContext facesContext = FacesContext.getCurrentInstance();
      FacesMessage facesMessage
          = new FacesMessage(e.getCause().toString());
      facesContext.addMessage(null, facesMessage);
      UIComponent source = event.getComponent();
      ActionSource actionSource = (ActionSource) source;
      Application application = facesContext.getApplication();
      MethodBinding binding = actionSource.getAction();
      // Retrieve the NavigationHandler instance..
      NavigationHandler navHandler = application.getNavigationHandler();
      // Invoke nav handling..
      String navBinding =
          (null != binding) ? binding.getExpressionString() : null;
View Full Code Here

    {
        // Retrieve the current FaceletContext from FacesContext object
        FaceletContext faceletContext = (FaceletContext) context.getAttributes().get(
                FaceletContext.FACELET_CONTEXT_KEY);

        ActionSource as = (ActionSource) parent;
        ValueExpression b = null;
        if (this.binding != null)
        {
            b = this.binding.getValueExpression(faceletContext, ActionListener.class);
        }
        ActionListener listener = new LazyActionListener(this.listenerType, b);
        as.addActionListener(listener);
    }
View Full Code Here

  public void processAction(ActionEvent actionEvent) throws AbortProcessingException
    {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        Application application = facesContext.getApplication();

        ActionSource actionSource = (ActionSource)actionEvent.getComponent();
        MethodBinding methodBinding = actionSource.getAction();

        String fromAction = null;
        String outcome = null;
        if (methodBinding != null)
        {
View Full Code Here

TOP

Related Classes of javax.faces.component.ActionSource

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.