Force update of rows when using asyncdataprovider

123 views
Skip to first unread message

Thomas Lefort

unread,
Jul 12, 2012, 11:40:23 AM7/12/12
to google-we...@googlegroups.com
I am looking for advice.

I display potentially a large amount of data available on my server in a cell table using the asyncdataprovider.

I can edit the data items in the list or add new items to the list. My problem is what is the best way to update the list once I have created a new item or edited one? shall I create a refresh method that calls the onRnageChanged method to force a refresh?

Thanks,

Thomas

Thomas Lefort

unread,
Jul 12, 2012, 1:36:42 PM7/12/12
to google-we...@googlegroups.com
OK, this seems to work for now. I added the following code to my asyncdataprovider class:

public void refresh() {
for(HasData<NewsFeed> display : this.getDataDisplays()) {
onRangeChanged(display);
}
}

It reloads data from teh server each time but it's not a big issue.
Reply all
Reply to author
Forward
0 new messages