Hello,
These are the framework used and their versions:
1. SmartGWT version: v9.0p_2013-07-15/LGPL Development Only (built 2013-07-15)
2. GWT version: 2.5.1
3. Mozilla Firefox version: 24.0
I have found 2 issues when working with a datasource with cacheAllData(true) but let's take them in order:
1. The first problem appears when adding a record into a TreeGrid that is databound to a datasource with cacheAllData set to true. The record is successfully added into the datasource cache when calling updateCache() but the TreeGrid doesn't shows the new record. After many tries I managed to see that this problem is reproduced only when the TreeGrid shows a flat list of records (all of the records are siblings) and the new record is added as a sibling. When the new record is added as a child of one of the siblings then all works as expected. See the comments in WBSPanel class in the addTask() method from the test case.
2. The second problem is that when a datasource has cacheAllData set to true and in the executeFetch method from the datasource we return the fetched data immediately without any delay then the components databounded to the datasource will not show any records. I overcomed this small problem by adding a Timer to simulate the response time from the server. This problem appeared only when trying to make the test case for you and I think it will never reproduce in a production enviroment. See the comments in TaskDataSource class in the executeFetch () method from the test case.
How to reproduce the two problems:
1. In the addTask() method from WBSPanel class make sure that the PARENT_UNIQUE_ID value is 1 and then in the GUI click the Add button. To make it work change the value from 1 to 4 and click add again.
2. Remove the Timer from TaskDataSource class from executeFetch() method.
Please find attached the test case that reproduces the problems.
These are the framework used and their versions:
1. SmartGWT version: v9.0p_2013-07-15/LGPL Development Only (built 2013-07-15)
2. GWT version: 2.5.1
3. Mozilla Firefox version: 24.0
I have found 2 issues when working with a datasource with cacheAllData(true) but let's take them in order:
1. The first problem appears when adding a record into a TreeGrid that is databound to a datasource with cacheAllData set to true. The record is successfully added into the datasource cache when calling updateCache() but the TreeGrid doesn't shows the new record. After many tries I managed to see that this problem is reproduced only when the TreeGrid shows a flat list of records (all of the records are siblings) and the new record is added as a sibling. When the new record is added as a child of one of the siblings then all works as expected. See the comments in WBSPanel class in the addTask() method from the test case.
2. The second problem is that when a datasource has cacheAllData set to true and in the executeFetch method from the datasource we return the fetched data immediately without any delay then the components databounded to the datasource will not show any records. I overcomed this small problem by adding a Timer to simulate the response time from the server. This problem appeared only when trying to make the test case for you and I think it will never reproduce in a production enviroment. See the comments in TaskDataSource class in the executeFetch () method from the test case.
How to reproduce the two problems:
1. In the addTask() method from WBSPanel class make sure that the PARENT_UNIQUE_ID value is 1 and then in the GUI click the Add button. To make it work change the value from 1 to 4 and click add again.
2. Remove the Timer from TaskDataSource class from executeFetch() method.
Please find attached the test case that reproduces the problems.
Comment