Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    ListGrid.addHeaderClickHandler is now in SVN.

    Sanjiv

    Comment


      #17
      Thank you!

      Comment


        #18
        server side sorting

        I have a similar problem regarding sorting.
        All my sorting is done server-side.
        I want to somehow force the menu item to kick off a new RPC call to my server everytime Sort Ascending or Sort Descending is clicked.
        How do I force server side sorting rather than the default client side sorting ?

        I have tried using transformRequest in DataSource to inject the right parameters for server-side sorting- the issue is that this method is not called when I click on the sort menu item. How can I force a data update ?
        Last edited by philestine; 15 Jun 2009, 08:19.

        Comment


          #19
          Try calling listGrid.invalidateCache() first.

          Comment


            #20
            Thanks.
            Could you be more specific ?
            Should I override the getHeaderContextMenuItems method in ListGrid and add listeners to the Sorting menu items as suggested above ?
            Or is there a cleaner way ?
            I kind of liked the Menu items as they were. I just wanted the RPC call to happen when I clicked "Sort Ascending" for example rather than client soide sorting.
            Are you suggesting adding an invalidateCache() call via a clickHandler on the header menu item ?

            I've also tried setting this to force server side calls:

            Code:
            	  isc.ResultSet.addProperties({
            		    useClientFiltering:false,
                		useClientSorting:false
            		});
            But although upon clicking "Sort Ascending" the grid seems to invalidate (in that it blanks and provides a loading message) no actual server calls are made.

            Any help gratefully received,
            Phil
            Last edited by philestine; 15 Jun 2009, 09:18.

            Comment


              #21
              Turning off client filtering and client sorting via the ResultSet should result in a server call, and the fact that the grid is showing a loading message indicates it is trying to contact the server. Double check server and client-side logs for any errors that may be occurring.

              Comment


                #22
                Thanks Isomorphic,
                I have been checking the server logs, and no call is being made.
                Also, suspiciously, the overridden transformRequest() method is also not being called upon clicking the "Sort Ascending" menu item.

                I am using the SCRIPTINCLUDE method for remote calls. Might this cause problems ?

                Comment


                  #23
                  Using scriptInclude means that some client-side tools won't report the server contact. Fiddler (for IE) definitely will. If you can show a standalone test case where you would expect a server call for a sort we can look at what's happening.

                  Note that calling invalidateCache() on headerClick, as previously suggested, should also force a server fetch, so that might clear up what's happening.

                  There may also be information available if you enable the "ResultSet" and "RPCManager" log categories in the Developer Console (you have looked there for warnings already, right?)

                  Comment


                    #24
                    Hi Isomorphic,

                    I got it working with the invalidateCache() call in the header click listener and the global settings to do server side calls as mentioned previously.

                    Thanks for all your help !
                    Phil

                    Comment


                      #25
                      Can you give details on how you did this?

                      Phil,

                      can you give details on how you did this?
                      I have a GwtRpcDatasource. I am checking DSRequest.getSortBy()
                      and passing this field to the server, and doing server side sorting.

                      thanks, Chris

                      Originally posted by philestine
                      Hi Isomorphic,

                      I got it working with the invalidateCache() call in the header click listener and the global settings to do server side calls as mentioned previously.

                      Thanks for all your help !
                      Phil

                      Comment

                      Working...
                      X