I have a few places where I do this sort of thing. Preferable I wrap
the original value obtained from my DAO in the GridDataSource right
after obtaining it. Where the wrapper does the further initilization
required. If that is not an option, you can always do the wrapping in
@SetupRender and pass a List of Wrapped objects to the Grid.
Hope it helps,
Joost
On 21/02/11 11:46 AM, Timo Westkämper wrote:
Hi.
I have my own GridDataSource for that, but I want to extend the data
fetched by the GridDataSource.
I can see the following options for that.
* lazily init reference data by using the objects return from
dataSource.getRowValue(0) to
dataSource.getRowValue(grid.getRowsPerPage() -1)
* add a listener to dataSource.prepare which initializes the reference
data
For the first approach I couldn't find a proper page lifecycle hook to
do it and the second approach means lots of work.
Is there really no better approach?
Br,
Timo Westkämper
On 02/21/2011 11:35 AM, Joost Schouten (ml) wrote:
Hi,
I assume that I can use Grid.getCurrentPage() and
Grid.getRowsPerPage() for that.
Correct, but even better would be to implement your own
GridDataSource since then you can do all the data fetching and
preperations in one go. Your own GridDataSource forms the source
@Parameter for the Grid.
Cheers,
Joost
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org