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?