Closed Listgroup cause selected items to get unselected

asked 2013-07-27 21:40:47 +0800

gyowanny gravatar image gyowanny
283 1 2 6

I have a listbox with a SimpleGroupsModel set. When I select some items from a given group and click on the group's header to close it then it makes the items unselected when I run myList.getSelectedItems(). When I open the group again the items are selected again. So my questions are:

  1. Why the heck we have that weird behavior on Grouped lists and why there isn't a property in the Listgroup class like 'setClosable(boolean)'? This is impossible that only me is looking for such behavior.

  2. Is there a way to freeze the Listgroup headers to prevent them to be closed?

Thank you,


delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-09-10 11:38:52 +0800

samchuang gravatar image samchuang
4084 4

Hi, selected item information is store at model, refer to http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zul/AbstractListModel.html#addToSelection%28E%29

so, how do you unselect items, can you provide runnable sample code?

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2013-07-27 21:40:47 +0800

Seen: 12 times

Last updated: Sep 10 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More