HI friends! i am new to Java and GWT. I want to create a PagingScrollTable in my application. There i need to mention a TableModel using TableModel I really dont know how to do it. Please can you help me do that. Kindly answer my question and reply me at [email protected]
A:
At this point, it is probably not worthwhile to continue using incubator tables. Development on the tables in the incubator have stopped in favour of the data presentation widgets in the upcoming GWT 2.1. GWT 2.1 is expected to be released before the end of the year, but there's a release candidate ready to go.
To answer your question anyway: you need to create a subclass of TableModel
that implements the requestRows
method. Your method must do the following things:
- Use
request.getStartRow()
andrequest.getNumRows()
to figure out which rows the table needs to display - Get the data for those rows
- If you succeeded in getting those rows, call
callback.onRowsReady
with the originalrequest
and a newResponse
object with those rows - If you failed in getting those rows, call
callback.onFailure
with some exception describing what failed.
Wesley
2010-10-14 19:36:02