myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volker Weber" <v.we...@inexso.de>
Subject Re: how does UICommand execute the action binding?
Date Fri, 02 Mar 2007 20:09:13 GMT
Hi Madhav,

the action methodBinding is handled in the defaultActionListener, which is
invoked also in
broadcast() from UICommand.

NavigationHandler.handleNavigation() is done in processAction of
defaultActionListener:
http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ActionListenerImpl.java?view=markup

Regards,
  Volker





2007/3/2, Madhav Bhargava <Madhav_Bhargava@infosys.com >:
>
>  Hi All,
>
>
>
> HtmlCommandLink and HtmlCommandButton extend UICommand component class.
>
> UICommand creates 2 MethodBindings – action and actionListener.
>
>
>
> I was looking at the code for UICommand class and I could locate where the
> registered actionListeners were getting executed – *broadcast* method but
> I was not able to figure out where the action method was getting invoked and
> how does NavigationHandler takes control from there on.
>
>
>
> In NavigationHandler javadoc the following is mentioned:
>
> public abstract void *handleNavigation*(javax.faces.context.FacesContext context,
>
>                                       java.lang.String fromAction,
>
>
>                                       java.lang.String outcome)
>
>
>
> *Parameters:*
>
> context - The FacesContext<http://java.sun.com/javaee/javaserverfaces/1.1/docs/api/javax/faces/context/FacesContext.html>for
the current request
>
> fromAction - The action binding expression that was evaluated to retrieve
> the specified outcome, or null if the outcome was acquired by some other
> means
>
> outcome - The logical outcome returned by a previous invoked application
> action (which may be null)
>
>
>
> Does it mean that if I create a MethodBinding out of an action EL
> expression and then invoke the same, then will it execute the action method
> and then automatically call the method specified above to navigate to next
> view according to the navigation rules defined?
>
>
>
> Any insight into this will be helpful.
>
>
>
> Regards,
>
> Madhav
>  **************** CAUTION - Disclaimer *****************
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
> solely for the use of the addressee(s). If you are not the intended
> recipient, please notify the sender by e-mail and delete the original
> message. Further, you are not to copy, disclose, or distribute this e-mail
> or its contents to any other person and any such actions are unlawful. This
> e-mail may contain viruses. Infosys has taken every reasonable precaution to
> minimize this risk, but is not liable for any damage you may sustain as a
> result of any virus in this e-mail. You should carry out your own virus
> checks before opening the e-mail or attachment. Infosys reserves the right
> to monitor and review the content of all messages sent to or from this
> e-mail address. Messages sent to or from this e-mail address may be stored
> on the Infosys e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
>
Mime
View raw message