Hi All,, Because of some reason, Discussion subject changed to "*Отг:* Handling next and prev buttons of SimplePager ??" for a reply. And here in gmail i got that reply as a new thread. So only i am replying from that new thread...
*But my thread was:* Hi, I am using GWT 2.3 cellTable to display the data using SimplePager. And i am following the example *AsyncDataProvider* as it is... http://code.google.com/webtoolkit/doc/latest/DevGuideUiCellWidgets.html<http://code.google.com/webtoolkit/doc/latest/DevGuideUiCellWidgets.html#data-provider> AsyncDataProvider provider = new AsyncDataProvider() { @Override protected void onRangeChanged(HasData display) { // Here i am doing rpc call to get the data *using cursors*... and its working fine. updateRowData(start, data); } }; But each time when i click *next button* i am getting next 20 values from the data store using cursor. And it is displaying the data fine. No issues with next button. But when i click *prev button*, i am assuming that cellTable had stored the previously displayed data, and just want to display that existing data, and handle this case without making RPC ?? but here when i click on prev button, progress bar is being displayed... what is that wrong here ?? (*DOUBT*: *on click of prev button*: what is the need of call to the server to get the duplicate data again ??) is their any other way to handle this case ?? Please any suggestions ?? Thanks in advance -- *S*antosh *K*umar *K *** *www.AccountingGuru.in <http://www.accountingguru.in/>* On Tue, Aug 9, 2011 at 11:51 AM, Miroslav Genov <[email protected]> wrote: > If you are using GAE cursors, then I'm mostly sure that they are forward > only cursors. So if you want to make your pager working, you had to keep all > received cursors in a list, to move back. > > So > > [page-1] - > cursor null > hit next > [page-2] -> cursor 1 > hit previous > [page-1] -> cursor null > > > [page-1] - > cursor null > hit next > [page-2] -> cursor 1 > hit next > [page-3] -> cursor 2 > hit previous > [page-2] -> cursor 1 (so when cursor2 is returned, you know how to move to > page - 4, but don't know how to move to page 2. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-web-toolkit/-/5trJtiumaH8J. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. ** -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
