Em Thu, 29 Oct 2009 16:00:01 -0200, Josh Canfield <j...@thedailytube.com> escreveu:

This could be naive since I don't use the grid, but can't you just
store the results in a property of the page/component when
getAvailableRows is called?

That's a nice idea. I would just store the results in a property of the GridDataSource implementation, not in the page itself.

The idea of having getAvailableRows() invoked before prepare() is that, in the prepare() method, you only fetch the row that will be shown in a given grid rendering. This way, if you have a search that returns 1000 rows but you're only showing 25 per page, you fetch these 25 rows, not 1000. My GridDataSource implementation, in its getAvailableRows() method, executes a query that only returns a count(*), not the rows themselves. They're fetched in prepare().

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to