Rick,

My answer was related to Esther Leimbeck's question.

When using the updateActionListener nested inside a commandLink, the backing bean will automatically be updated.

Have a look at the Master-Detail example:
http://irian.at/myfaces/masterDetail.jsf
http://irian.at/myfaces/masterDetail.jsp.source

regards,Thomas

http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German

On 9/16/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
Thomas Spiegl wrote the following on 9/16/2005 10:14 AM:
> If your bean is Serializable use
>
> <t:saveState value="#{yourBean}" />

That's not what I'm asking though. I'm asking about how to use the
t:updateActionListener tag. I'm thinking the tag would be used inside of
a commandLink or commandButton tag and when the action is fired that the
link or button represents, it will automatically set and bean properties
of the backing bean backing that action? If so, this would be a SUPERBLY
nice feature.

Currently, for example if you pass in parameters with a commandLink you
need to do the following in the resulting action (assuming foo is the
f:param):

FacesContext context = FacesContext.getCurrentInstance();
Map map = context.getExternalContext().getRequestParameterMap();
String foo = (String) map.get("foo");

I'm assuming that possibly t:updateActionListener would avoid this
construct and that if you had a property in the Action called "foo" it
would be automagically populated using the tag. This would be very nice
- so nice, that I think it should be part of standard JSF.

>
> to make yourBean available on next page.
>
> regards, Thomas
>
>
>
> On 9/16/05, *Rick Reumann* <[EMAIL PROTECTED] <mailto: [EMAIL PROTECTED]>> wrote:
>
>     Martin Marinschek wrote the following on 9/16/2005 8:25 AM:
>
>      > A cool MyFaces specific feature is the t:updateActionListener tag
>     - you
>      > can set a value onto a backing bean if a command has been executed.
>
>     I'm very interested in seeing this tag used or some docs on it. I looked
>     under the UpdateActionListenerTag docs
>     http://myfaces.apache.org/javadoc/tomahawk/ and
>     http://myfaces.apache.org/tlddoc/tomahawk/   but didn't find anything.
>
>     Does one of the MyFaces examples show how it's used?
>
>     --
>     Rick
>
>


--
Rick

Reply via email to