tags:

views:

8

answers:

1

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:

  1. Use request.getStartRow() and request.getNumRows() to figure out which rows the table needs to display
  2. Get the data for those rows
  3. If you succeeded in getting those rows, call callback.onRowsReady with the original request and a new Response object with those rows
  4. If you failed in getting those rows, call callback.onFailure with some exception describing what failed.
Wesley