DISQUS

DISQUS Hello! Adrian Smith's Blog is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Jump to original thread »
Author

How to Create a Remote Paging Listview Using GWT-Ext

Started by Adrian Smith · 8 months ago

Creating a remote paging listview isn’t particularly difficult but getting to the point of knowing how all the pieces fit together can be tricky first time round. This post describes how I created a very simple remote paging listview that retrieves each page of data from an Oracle databa ... Continue reading »

12 comments

  • Thanks for the great tutorial. I want to use the Grouping Grid in my application. My data set is pretty large (around 7000 rows). This amount of data seems to be way too much to transmit/display all at once. I was trying to think of how I could use the model you have demonstrated with the tree-like functionality of the Grouping view. It seems like I have to split the work into at least two pieces: collecting and presenting data for the initial collapsed tree; and secondly collecting and presenting the data as each node in the tree is expanded.

    Is there a better way? Can you recommend an approach? Is this even possible since the root/first level of the tree looks different from a data perspective (i.e. fewer columns than an expanded node showing record details).

    Any advice would be appreciated.
  • Hi myio,

    It's difficult to say what the best approach is without understanding your data and how it would be best presented. With 7000 rows of data I'd say you're on the right track with remote paging.

    The Grouping Grid looks pretty similar to the standard Grid. From looking at the example here (http://www.gwt-ext.com/demo/#gridGrouping) the only difference is that you use a GroupingStore, a GroupingView and call grid.setAutoExpandColumn() on the GridPanel.
  • Great howto. I found it extremely useful, since RPC serialization would just explode for > 700 of the entities I am working with.
  • Hi Adrian,
    Thanks for the nice article. I'm trying out something like this. I have a search criteria and when I click the submit button I need to load the store. I can see on the server side, the data is being generated and response is sent. But on the client side, the grid is not getting refreshed. I've posted the problem with code snippets here http://gwt-ext.com/forum/viewtopic.php?f=2&...

    If possible, do let me know if you sense any problem somewhere.

    regards
    Prakash
  • Hi,
    Thank you for the great tutorial. I do need some help and guidance for the following issue -- The code works perfectly fine when run in hosted mode, however when I run it in web mode, I do not see any data in the grid. I do not get any exceptions either. I tried all possible ways/options and couldn't proceed further. Can you please guide me. Thanks a lot.
  • I'm getting everything but the data being displayed too. The data is returned to the client and is nicely displayed in Firebug, but no sign of it in the GridPanel. Any suggestions anyone?
  • Great piece of codes to work with.I'm getting everything but the data being displayed too. The data is returned to the client and is nicely displayed in Firebug, but no sign of it in the GridPanel. Will this not change with new platforms enforced?
  • Hi, very good code.

    I just have one doubt. I follow the steps and my json is like it:

    {
    "accounts": [
    com.microcpd.mapp.server.Account@13b9fae,
    com.microcpd.mapp.server.Account@1706da8,
    com.microcpd.mapp.server.Account@2f356f],
    "totalCounts": 3}

    Why are not showing the attributes of the Account, it's showing the object.

    Thanks a lot
  • Could it be that your Account object isn't a javabean (with getters for each attribute)?
  • Unfortunately i put all the getters and setters methods. Do you have another idea about this problem? Maybe i am doing a mistake and i didn't notice.

    I notice the following:

    JSONArray jsonPersons = new JSONArray(persons, true);

    I don't have the constructor method JSONArray with a parameter boolean like you code. In my code is:

    JSONArray jsonAccounts= new JSONArray(accounts);


    Other observation:

    How is inserted the attribute class in JSON:

    {
    "class": "class com._17od.servlets.Person",
    "dateOfBirth": "2001-05-19",
    "firstname": "Rebecca",
    "id": 5,
    "lastname": "Taylor"
    }



    Thanks a lot
  • Hi,
    I tried above example , in my data base i have 21 records.But it's displaying only 15 records in my grid and next page and last page buttons are disabled.Could you help us to figure out the mistake done by me.

    Regards,
    Rajesh
  • Hi Rajesh,

    Is the "total" attribute returned in your JSON correct? (the total field in the example I give is "totalPerons" - although that's a mis-spelling, it should be "totalPersons"). This attribute should be the total number of records in the listview, not just the current page.

    Adrian

Add New Comment

Returning? Login