If I'm understanding you correctly, yes. This code can be used to get a DataGridState instance from any JPF action (or any other Java code) -- all that's needed is the request and the name of the data grid.
HTH. Eddie On 11/29/06, Srinivas Surapaneni <[EMAIL PROTECTED]> wrote:
Eddie, I saw the sample But I need to get the DataGrid state from pageflow/session scope for all the actions other than paging/sorting actions and set the page number for the datagrid Is this you are recommending for now? Tank You Srinivas -----Original Message----- From: Eddie O'Neil [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 29, 2006 5:55 PM To: Beehive Users Subject: Re: DataGrid state Srinivas-- Yes; just create a DataGridState object using the DataGridStateFactory. This will capture the state from the URL for the current page, sorts, and filters in a JavaBean that can be stored in a Page Flow, in session, etc. There is example code for this here: http://beehive.apache.org/docs/1.0.1/netui/tags/datagridSortAndFilter.html#s ort-datagrid http://beehive.apache.org/docs/1.0.1/netui/apidocs/javadoc/org/apache/beehiv e/netui/databinding/datagrid/api/DataGridState.html There is also a sample of this in: samples/netui-samples/src/ui/datagrid/sortandfilter/Controller.java Once a DataGridState object exists, it can be used to populate sort / filter / paging UI. It should also be possible to set an existing DataGridState object on a dataGrid, though this isn't easy to do and requires building a custom DataGridConfig object. This should be simpler -- feel free to create an enhancement in JIRA for this. HTH. Eddie On 11/29/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is there any elegant way to keep the DataGrid state in pageflow/session scope between multiple URL requests? > > If we click on the paging and sorting links, datagrid state is constructed from the values passed as URL parameters in the paging action and sorting action > > Normally a page contains lot other things than the Data Grid. > > I had a paginated datagrid and had hyperlinks outside of the datagrid. When I click on any hyperlinks outside of the datagrid, it resets the datgrid state to go the first page. > > Thank You > Srinivas > -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.14.19/556 - Release Date: 11/28/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.14.19/556 - Release Date: 11/28/2006
