0

I have a listgrid with a lot of lines and i would like to implement a mechanism such as in the listgrid, lines are paginated (25 line) and i would like that the results are fetched each time i switch pages NOT one time at the beginning. Lines are fetched calling a servlet wich need to be executed in max 60 seconds maximum. The result of the servlet is a JSON and with this JSON i have writed a class MyJsonDataSource that extends XJSONDataSource. This MyJsonDataSource then is used throw the method

public static MyJsonDataSource getInstance() { 

        if (_instance == null) { 
            _instance = new TemplateJsonDataSource();
        }


        return _instance;  
    }

by the listgrid with the listgrid setDataSource method.

How i can do to solve that problem? Can someone share a working example code?

  • This post [Support of pagination in smartGWT for ListGrid?](http://stackoverflow.com/questions/9468486/support-of-pagination-in-smartgwt-for-listgrid) might help you. – Braj Jun 26 '14 at 12:39

1 Answers1

0

please using datasource and rest service,when scrolling, the listgrid will send startrow and endrow parameter to server by datasource dynamically, get these parameters and return right records in your servlet or rest service in server side

you can check the examples

raywang
  • 455
  • 1
  • 4
  • 9