I implemented a similar solution once. The trick is to get the right
rows from the DB as well as to formulate the query correctly.
The main 2 values you need are the starting row and the size of the
page. You can luckily get those from the PagingState object which can be
referenced in the ITableModel class you are writing.
That is the simple idea. Now you can query the DB in any way you want. I
used HQL and created a Query object and used
setFirstResult(pagingFirstRow) to set the first row of the return query
and then used setMaxResults(pagingSize) to return the correct number of
objects.
This is the basics you still need to cater for how the table was sorted
etc...
Have a look at SimpleTableModel.java in the tapestry source for more info.
HTH!
Gary
Andreas Bulling wrote:
I'm still also very interested in a Table(Column)Model ;)
On 07. Mär 2006 - 09:19:53, Vinicius Carvalho wrote:
| Hello there!
| I guess this might have been asked before, I couldn't find on the list, so
| here I go.
| Does anyone has an Hibernate TableModel for the Table component? I"m kinda
| confused on how to implement the getCurrentPageRows() method
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]