Announcement

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

    setOpenState no longer working

    My refresh method that worked with smartgwt 2.1 is no longer resetting the open state of my treegrid. I'm using the SmartGwt build from today, Windows 7, and Firefox 3.6.8

    Code:
    public void refresh()
    {
      final String selectedPaths = grid.getSelectedPaths();
      final String openState = grid.getOpenState();
    
      grid.invalidateCache();
      grid.fetchData(null, new DSCallback()
      {
         public void execute(DSResponse response, Object rawData, DSRequest request)
        {
    	grid.setOpenState(openState);
    	grid.setSelectedPaths(selectedPaths);
        }
      });
    }

    #2
    Hi Banang,
    This is working for us in a simple test case.
    There are various factors which may be involved -- for example incremental data loading could cause this to fail (if the data isn't yet loaded the 'setOpenState()' call will be unable to open the tree directly).
    That particular issue seems unlikely to be the culprit as the same would have been true in SGWT 2.1.

    In short we'll need to see a test case to get to the bottom of this.
    If you could boil this down to a standalone test case we can run on our end that demonstrates the problem, this would be ideal.

    If thats not feasible, even the tree grid definition, dataSource definition, and ideally some sample data might give us enough to go on


    Thanks

    Isomorphic Software

    Comment


      #3
      I've uploaded a project at http://www.4shared.com/file/BlGqI5qs/Scaffold.html (your forum does not allow uploading of zipped files) that reproduces this behaviour. The grid is defined in

      Code:
      com.scaffold.client.view.component.TypeBrowser
      The data it's fed from the server is found in the working directory under
      Code:
      resources/Types.txt

      Comment


        #4
        Are there any news on this?

        Comment


          #5
          Hello banang,

          Thanks for trying to put together a test case, but, sorry, we don't look into test cases that are really entire applications - you need to minimize the code involved until it's plausible that there's a framework flaw as opposed to bugs somewhere in your application.

          At that point, there will be no need to post a 13MB .zip file to provide a test case - typically it would be just one short file.

          Comment


            #6
            There you go.
            Attached Files

            Comment


              #7
              Thanks, we'll take a look and get back to you.

              Comment


                #8
                Ok this issue should be resolved in the next nightly build.

                However you can also resolve this by getting rid of the call to 'invalidateCache()' followed immediately by the call to fetchData()

                Try instead calling 'setData()' on your grid with an empty array, then calling fetchData() with the appropriate criteria / callback and the problem should go away.

                Comment


                  #9
                  I've now tried this with the build from last night, and the problem is still there. Solving it with your setData() workaround seems to work, though.
                  Last edited by banang; 23 Nov 2010, 04:53.

                  Comment


                    #10
                    Can you make very sure you've got the new code - open Firebug's Net panel and look at the top of ISC_Core.js. You should see yesterday's date in the header area.

                    Comment


                      #11
                      You're right. I was running an old version still. New one works, thanks for that.

                      Comment

                      Working...
                      X