Package javax.faces.component

Examples of javax.faces.component.ActionSource


    {
      ValueExpression fromExpression = _from.getValueExpression(faceletContext,
                                                                Object.class);
      ValueExpression toExpression=  _to.getValueExpression(faceletContext,
                                                            Object.class);
      ActionSource actionSource= (ActionSource) parent;
      actionSource.addActionListener(
        new SetActionListener(fromExpression, toExpression));
    }
  }
View Full Code Here


     */
    public void apply(FaceletContext ctx, UIComponent parent)
            throws IOException, FacesException, FaceletException, ELException {
        if (parent instanceof ActionSource) {
          if (ComponentSupport.isNew(parent)) {
        ActionSource as = (ActionSource) parent;
        ValueExpression b = null;
        if (this.binding != null) {
          b = this.binding.getValueExpression(ctx, ActionListener.class);
        }
        ActionListener listener = new LazyActionListener(this.listenerType, b);
        as.addActionListener(listener);
      }
        } else {
            throw new TagException(this.tag,
                    "Parent is not of type ActionSource, type is: " + parent);
        }
View Full Code Here

    }

    public void apply(FaceletContext ctx, UIComponent parent)
            throws IOException, FacesException, FaceletException, ELException {
        if (parent instanceof ActionSource) {
            ActionSource src = (ActionSource) parent;
            if (ComponentSupport.isNew(parent)) {
                ValueExpression valueExpr = this.value.getValueExpression(ctx,
                        Object.class);
                ValueExpression targetExpr = this.target.getValueExpression(
                        ctx, Object.class);

                ActionListener listener;

                if (FacesAPI.getVersion() >= 12 && src instanceof ActionSource2) {
                    listener = new SetPropertyListener(valueExpr, targetExpr);
                } else {
                    listener = new LegacySetPropertyListener(
                            new LegacyValueBinding(valueExpr),
                            new LegacyValueBinding(targetExpr));
                }

                src.addActionListener(listener);
            }
        } else {
            throw new TagException(this.tag,
                    "Parent is not of type ActionSource, type is: " + parent);
        }
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;
        String outcome;
        if (methodBinding == null)
        {
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;
        String outcome;
        if (methodBinding == null)
        {
View Full Code Here

      // =-=AEW Couldn't this be cached?
      ValueExpression fromExpression = _from.getValueExpression(faceletContext,
                                                                Object.class);
      ValueExpression toExpression=  _to.getValueExpression(faceletContext,
                                                            Object.class);
      ActionSource actionSource= (ActionSource) parent;
      SetActionListener listener = new SetActionListener();
      listener.setValueExpression("from", fromExpression);
      listener.setValueExpression("to", toExpression);
      actionSource.addActionListener(listener);
    }
  }
View Full Code Here

  public void apply(FaceletContext faceletContext,
          UIComponent parent) throws IOException, FacesException, FaceletException, ELException
  {
    if(ComponentHandler.isNew(parent))
    {
      ActionSource actionSource = (ActionSource)parent;
      ReturnActionListener listener = new ReturnActionListener();
      if (_value != null)
      {
        ValueExpression valueExp = _value.getValueExpression(faceletContext, Object.class);
        listener.setValueExpression(ReturnActionListener.VALUE_KEY,valueExp);
      }

      actionSource.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;
        String outcome;
        if (methodBinding == null)
        {
View Full Code Here

      MethodExpression me = _method.getMethodExpression(faceletContext,
                                                        Object.class,
                                                        _METHOD_PARAMS);
      listener.setMethod(me);

      ActionSource actionSource = (ActionSource)parent;
      actionSource.addActionListener(listener);
    }
  }
View Full Code Here

  public void apply(FaceletContext faceletContext,
      UIComponent parent) throws IOException, FacesException, FaceletException, ELException
  {
    if(ComponentHandler.isNew(parent))
    {
      ActionSource actionSource = (ActionSource)parent;
      ResetActionListener listener = new ResetActionListener();
      actionSource.addActionListener(listener);
    }
  }
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.