1. #11
    Sencha User rohdef's Avatar
    Join Date
    Mar 2010
    Location
    Aarhus, Denmark
    Posts
    67
    Vote Rating
    3
    rohdef is on a distinguished road

      0  

    Thumbs up


    Quote Originally Posted by PhiLho View Post
    GWT has some primitive logging facilities out of the box, and I started to use GWT-log for this, as it offers extra flexibility / features / nicer output.
    I can confirm that GWT-log is quite useful. I'm especially fond of the div-logger, so I can see the logs in a panel my app, which I disable on deploy.

  2. #12
    Sencha User
    Join Date
    Oct 2011
    Posts
    20
    Vote Rating
    0
    nstokoe is on a distinguished road

      0  

    Default


    Casting the loader as a PagingLoader seems to work. The one thing I'm missing how the server method for returning filtered, paged, and sorted results would look. Could you post a sample of the new getStocks method that works with the updated example?

  3. #13
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Answers
    109
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    The server code will probably be pretty specific to your particular backend - any kind of database probably provides features to filter or sort that would be much faster than implementing your own in your app server.

    To send back the results, they should be packaged in a PagingLoadResult when they get to the loader so it can see how much data is left, and inform the store, toolbar. The sample code you posted seems to indicate that there is some DataProxy<FilterPagingLoadConfig, PagingLoadResult<KdoBaseDTO>> instance called 'service' that is actually being passed into your loader, but I don't see where that is defined, or how it is getting the data.

    If using RPC, return an instance of PagingLoadResultBean<KdoBaseDOT>, having set the data, totallength, and offset, either in the constructor or with setters. If using RequestFactory, you'll need to indicate a specific class to return - RF has some issues with generic data (check out the examples sources at http://www.sencha.com/examples-dev/#...estfactorygrid). Using JSON or XML, you'll just create a PagingLoadResult instance from the data sent back from the server (there are no paging examples of this, but http://www.sencha.com/examples-dev/#...Place:jsongrid should give you the right idea).