How to get the data out of a CellTable?

23 views
Skip to first unread message

membersound

unread,
Feb 15, 2013, 9:43:54 AM2/15/13
to google-we...@googlegroups.com
Hi,

I set the data into a table with: cellTable.setRowData(myList);

But what is the proper way to perform CRUD on this list, or retrieve the whole data of the CellTable?
Especially I'm interested in auto-update of the list when the user changes something within an EditTextCell.

Should I just keep a private List<Foo> in the same class where the cellTable resides? Or should this be done using a ListDataProvider<Foo>?

Thomas Broyer

unread,
Feb 15, 2013, 10:11:08 AM2/15/13
to google-we...@googlegroups.com


On Friday, February 15, 2013 3:43:54 PM UTC+1, membersound wrote:
Hi,

I set the data into a table with: cellTable.setRowData(myList);

But what is the proper way to perform CRUD on this list, or retrieve the whole data of the CellTable?
Especially I'm interested in auto-update of the list when the user changes something within an EditTextCell.

That's easily done with FieldUpdaters on your Columns.

Should I just keep a private List<Foo> in the same class where the cellTable resides? Or should this be done using a ListDataProvider<Foo>?

The one thing data providers do is listening to range-change events (i.e. pagination events); they also make it easier to have multiple simultaneous, synchronized views of the same list, but that's rather an edge case. Data providers also help decoupling your data retrieval from your "screens" (activities, presenters, views, you name them).
This is all independent from the above re. FieldUpdaters.
Reply all
Reply to author
Forward
0 new messages