Revision history [back]

click to hide/show revision 1
initial version

asked 2017-08-29 16:02:22 +0800

sboscolo gravatar image sboscolo

How to control selectAll() feature in a Listbox with multiple=true and checkmark=true

Hi, I noticed that the only way to programmatically (java) uncheck the checkmark on listbox header is to remove all listitems from the listbox:

for (Iterator<component> itemIterator = listbox.getChildren().iterator(); itemIterator.hasNext();) {
Component item = itemIterator.next();
if (!((item instanceof Listhead) || (item instanceof Auxhead) || (item instanceof Listfoot))) {
itemIterator.remove();
}
}

The problem is that if listbox has no listitems, I can't uncheck the checkmark. As a workaround, I add a not visible listitem, so the listbox is never empty. Is there a better way to

How to control selectAll() feature in a Listbox with multiple=true and checkmark=true

Hi, I noticed that the only way to programmatically (java) uncheck the checkmark on listbox header is to remove all listitems from the listbox:

for (Iterator<component> itemIterator = listbox.getChildren().iterator(); itemIterator.hasNext();) {
Component item = itemIterator.next();
if (!((item instanceof Listhead) || (item instanceof Auxhead) || (item instanceof Listfoot))) {
itemIterator.remove();
}
}

The problem is that But if the listbox has no listitems, I can't uncheck the checkmark. As a workaround, I add a not visible listitem, so the listbox is never empty. Is there a better way toto accomplish this?

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