myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger" <mkien...@gmail.com>
Subject Re: how does UICommand execute the action binding?
Date Sat, 03 Mar 2007 15:53:25 GMT
See this thread:

http://www.mail-archive.com/users@myfaces.apache.org/msg34510.html

and this document

http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSFConfigure7.html


On 3/3/07, Madhav Bhargava <unmarshall@gmail.com> wrote:
>
> Thanks Volker,
>
> I figured that out, but still i cannot understand the usage of
> <from-action>.
> I needed the above information because i needed to call an action method
> and then transfer the control the navigation handler programmatically. I was
> able to achieve the same by first creating a MethodBinding, invoking it,
> getting the return value as an outcome and passing the same to the
> handleNavigation method of the NavigationHandler.
>
> It worked for me.
> ~madhav
>
> On 3/3/07, Volker Weber <v.weber@inexso.de> wrote:
> >
> > 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***
> > >
> >
> >
>
>
> --
> When I tell the truth, it is not for the sake of convincing those who do
> not know it, but for the sake of defending those that do

Mime
View raw message