Announcement

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

    ListGrid.createRecordComponent () not called for all rows

    Hi,

    I am on SGWT 2.2 & GWT 2.1.

    I have a DS-backed ListGrid. It is 10 rows high. 20 rows are returned from the DS on the first view, but the ListGrid.createRecordComponent () method is only called for the first 16 rows.

    This seems reasonable at first, since rows 11-20 are out of view. But, when you scroll down to the last 10 rows, it is still not called, resulting in empty cells. It's not throwing warnings or errors, and I confirmed with the debugger that it's not being called, rather than just returning a blank canvas. Can anyone help with this issue?

    Thanks

    #2
    Definitely want to move to the latest code, lots of fixes in this area.

    Comment


      #3
      I tried the latest nightly build, and the issue is still there. (I since found out we were using 2.4 anyway).

      I did find out something else interesting: if I have the DS return 100 rows, not 20, the grid makes two calls. It gets rows 0 to 75, and then 76 to 100, all before the user has scrolled down at all from seeing the first 10. And in this instance, all 100 rows have the components drawn. This seems like it narrows the issue down a bit. Can any of you experts out there shed light on this?

      Edit: any number of totalRows over 76, that causes 2 or more calls to the DS, results in the components painting properly.

      Thanks
      Last edited by andrewbee; 4 May 2011, 11:42.

      Comment


        #4
        We have various test cases that appear to cover this usage and are passing. Try putting together a standalone test case.

        Comment


          #5
          I figured it out - I was doing setShowAllRecords(true) on the ListGrid.

          It's behaving normally now, except for one thing: it leaves blank space at the end of the rows, when scrolling.

          For example, my viewport is 10 rows deep. I have 20 rows shown. The scrollbar however is sized at about a third of the height, as though it's sized for 30 rows. Sure enough, you scroll all the way down, and the last row is shown at the top of the ListGrid, with blank space below. Is this normal?

          Thanks

          Comment


            #6
            ShowAllRecords or not, you should see getRecordComponent called for every row that's drawn. Please let us know if you can reproduce a problem.

            Yes, it's normal that blank space is left with variable size rows and incremental rendering - see the virtualScrolling docs.

            Comment


              #7
              Hi,
              Try to add ListGrid.draw() method at the end when u set all other properties of ListGrid.Remember this must be the last property to set.Set all other properties before this.

              I hope this will help.

              Comment


                #8
                I can confirm that 'setShowAllRecords(true)' is causing 'createRecordComponent' to be ignored after a random number of rows.

                setting 'setShowAllRecords(false)' solves the issue.

                This is only happening occasionaly and the number of rows until it is not called anymore changes.

                I am using SmartClient Version: v8.3p_2013-01-22/PowerEdition Deployment (built 2013-01-22)

                Happens in Firefox 22.0 aswell as internet Explorer 10

                Comment


                  #9
                  Does calling setRecordComponentPoolingMode("data") fix it?

                  Comment


                    #10
                    Sorry for my late reply.

                    Unfortunately, still rendering only the first few components inside the grid.

                    Code:
                     
                    lg.setShowAllRecords(Boolean.TRUE);	
                    lg.setRecordComponentPoolingMode(RecordComponentPoolingMode.DATA);

                    Comment

                    Working...
                    X