Reputation: 1457
Is it possible to switch CellList
between several DataProvider
s?
For example ListDataProvider
and AsyncDataProvider
?
dataProviderAsync.addDataDisplay(getView().getCellList());
dataProviderList.addDataDisplay(getView().getCellList());
I can add some providers, but I can't clean datadisplay
public Set<HasData<T>> getDataDisplays() {
return Collections.unmodifiableSet(displays);
}
Upvotes: 0
Views: 54
Reputation: 5599
You can not have many data providers for one data display at one time (you can have many displays for one data provider).
However you can change data provider at run-time.
If you want to switch between data providers (I guess when new data arrives on AsyncDataDrovider
) you can override onRangeChanged()
of your data provider and change data display.
One important thing is that onRangeChanged()
is fired when there is a data display added to the provider. So you have to add some 'dummy' display, wait for data and then change display.
Upvotes: 2