Friday, September 19, 2014

newbie CellList Question (remove selected)

I'm using two CellLists as a multi-selection mechanism, both backed with a DataListProvider and KeyProvider for a small, private class (with a couple of strings).  SimplePager for both lists.

Basically the user can select multiple items from the "Left List" and push them over the the "Right List".  Doing this because the options available in the left list could be pages long, and I want the user to easily see what has been selected as they page through their options.  (Selected items are in the right list...like a shopping cart.)

I have the lists working pretty well, and have a button to move the selected items from the left to the right.  (Will have to do a de-select to move items back.)

However, I'm puzzled as to how to determine which of the items in the DataListProvider's List I actually moved.  I'm currently using SelectionModel.getSelectedSet(), and this accurately tells me what objects to add to the Right List, but not which items these actually are in the original List so that I can remove them.

Is there a tip or trick to go about finding the currently selected items in a CellList and removing them from the underlying DataListProvider's List?

Thanks in advance,
AJ

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment