Title: Message
<t:saveState> is trivially simple to use, but it's a Godsend.  Wherever you want the state of a bean to be maintained across requests, just declare the bean with request scope and put a <t:saveSave value="#{myBean}" on the pages that use it.  The bean's state will be maintained until control reaches a page that doesn't have a <t:saveState> declared for it, at which point it will go away automatically.
 
So wherever you need to maintain the state of a bean for more than one request (but don't need it for the entire session), stick in a <t:saveState> tag for all pages that use it, and you're set.
 
If you do this, and you follow Mike Kienenberger's suggestion to access the DataModel object that backs the dataTable component (illustrated in the O'Reilly book JavaServer Faces, pp. 175 - 179), you're all set; you don't need to pass any parameters through the request.
 
Using the DataModel object also is explained in the book CoreJavaServer Faces (Geary, Horstmann), pp. 185 - 201.
 
- Brendan
-----Original Message-----
From: Rick Reumann [mailto:[EMAIL PROTECTED]
Sent: Friday, August 26, 2005 4:41 PM
To: MyFaces Discussion
Subject: Re: Dealing with links/buttons to fire off an action? confusion on how to set this up



On 8/26/05, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]> wrote:

However, I believe that, using this mechanism, there's no real way to get around using something like <t:saveState> or having a session-scoped bean.  Just out of curiosity, what is the objection to using <t:saveState>?


Well I haven't gotten that far in my learning to have touched upon t:saveState. Was actually just more curious in general of how you deal with cases where you would typically want to use requestParams attached to a url link.


--
Rick

Reply via email to