Announcement

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

    Grid Grouping Issue

    SmartClient Version 7.0beta4, SmartGWT svn from 4 Mar.

    I'm loading grid B based on the selection on grid A. If grid B is grouped by the year field (Integer), when an entry in A is selected that only causes one record to be fetched for grid B, B will not show the record. Enabling Info for ResultSet shows grid B found the record. Repeating the process after removing the grouping works fine.

    I'm using the manual load via GWT/RPC with addData(record) for each returned entry with the fetchData from the grid after the rpc is completed and loaded into the dataset.

    Note:
    I had to stop using setTestData since it would cause some sort of race condition with larger data sets (somewhere greater than 100 items depending on the wind speed and phase of the moon) where the fetchData would see an empty datasource even though setTestData had returned.

    Note 2:
    I haven't seen any web application that can handle the amount of data SmartClient does and still perform well; I'm impressed.

    #2
    You want to be using setTestData() and that may well be the problem. No mysterious race conditions involved, just make sure you've called setTestData() before any component attempts a fetch on the DataSource. In particular, don't create a component with autoFetchData:true unless you have first populated the DataSource.

    Comment


      #3
      setTestData doesn't work with large result sets. There is no way to know when the data is really there. A call to fetch data a few lines after the setTestData may find 0 records when the data has more 150-200 rows depending depending on other activity on the computer. addData seems to always work since if the fetchData finds at least one record it will add the rest.

      Comment


        #4
        You're not really clear on how these methods actually work :)

        You want to get the data from the server via GWT-RPC and call setTestData(), then call fetchData() on components and/or create them after the data has been fetched. There's no possibility of getting a partial dataset this way. You create the possibility of getting a partial dataset specifically by using addData() to populate the DataSource, whereas setTestData() is the right way.

        Comment

        Working...
        X