We are currently having trouble understanding how to properly create a Timeline bound to a RestDataSource. We want to leverage the paging mechanism provided by smartGWT because the data size is potentially quite large.
Our current logic is the following:
1) Create the timeline (autoFetchData(false), a datasource is provided to the timeline as well).
2) Fetch once all the data (from another datasource), so we can create the lanes. After that the datasource which is bound to the timeline will be providing the events with "lane" and "sublane" properties set.
3) Call timeline.fetch(), so it can populate itself with data.
The 3rd point is where we have currently an issue. We are able to verify that the datasource which is bound to the timeline actually returns the correct result. However, the callback in the timeline.fetch(null, new DSCallback...) has an empty Record[] in the dsResponse.getData() property and then no events are shown.
If we do not set a datasource to the timeline, and instead use dataSource.fetchData() and in its callback we call timeline.setData() everything is fine, so we verified that the Records can actually be processed by the timeline and it's not an issue of the data given to it. But this is not what we want since paging is not going to work (is that correct?).
Can you provide some insight? Maybe there is an example of a timeline bound to a RestDataSource?
SmartClient Version: v10.0p_2014-09-25/Pro Deployment (built 2014-09-25)
Our current logic is the following:
1) Create the timeline (autoFetchData(false), a datasource is provided to the timeline as well).
2) Fetch once all the data (from another datasource), so we can create the lanes. After that the datasource which is bound to the timeline will be providing the events with "lane" and "sublane" properties set.
3) Call timeline.fetch(), so it can populate itself with data.
The 3rd point is where we have currently an issue. We are able to verify that the datasource which is bound to the timeline actually returns the correct result. However, the callback in the timeline.fetch(null, new DSCallback...) has an empty Record[] in the dsResponse.getData() property and then no events are shown.
If we do not set a datasource to the timeline, and instead use dataSource.fetchData() and in its callback we call timeline.setData() everything is fine, so we verified that the Records can actually be processed by the timeline and it's not an issue of the data given to it. But this is not what we want since paging is not going to work (is that correct?).
Can you provide some insight? Maybe there is an example of a timeline bound to a RestDataSource?
SmartClient Version: v10.0p_2014-09-25/Pro Deployment (built 2014-09-25)