jdevelop
jdevelop

Reputation: 12296

GWT: get backing object for row by id in table

Is there any simple way to get the object, used to render given row in CellTable, by index of the row?

I am using AsyncDataProvider, and don't want to remember lists of data objects, returned from the server. Also I am using MultiSelectionModel, so several items could be selected there and I need to track out which one was clicked last.

I know the index of last clicked row, so I need to get the object, corresponding to the row, somehow.

Upvotes: 0

Views: 1469

Answers (1)

Thomas Broyer
Thomas Broyer

Reputation: 64541

getVisibleItem? possibly combined with getPageStart if you're using paging and you only know the absolute index.

For your use-case, maybe you could use a customized selection model whose setSelected tracks the last change.

Upvotes: 3

Related Questions