SingleSelectionModel and unselecting items

Skip to first unread message


Mar 29, 2012, 6:30:15 PM3/29/12
Dear group members,

I use a CellList to display an overview of all persons. I've used the CellList showcase (CellList showcase) as orientation, but I did not use UIBinder.

Instead of display all information after selecting an item, as in the showcase, I want to open a popup window.

This works fine, since I solved it with a SelectionChangeEventHandler a popup appears. But when the popup closes (due to autoClose), I want to de-select the selected Item.

Now let the code speak for itself:

Popup CloseHandler:

myPopup.addCloseHandler(new CloseHandler<PopupPanel>() {
public void onClose(CloseEvent<PopupPanel> event) {
selectionModel.setSelected(selectedItem, false);

When I click on the item the popup appears, if I click anywhere else  the popup disappears and the item is de-selected. But now I cannot re-select the item and the application seems to be frozen.

I read about the problem with the SelectionChangeEvent loop, but does the closeHandler affect this loop?

Just ask if you have questions or need more information about my code.

I'm thankful for every help I can get.

Best R.
Reply all
Reply to author
0 new messages