Revision history [back]

click to hide/show revision 1
initial version

answered 2012-02-17 11:18:25 +0800

Neus gravatar image Neus

I'm changing to ZK6 binding. Matze2 said that with ZK6 Bind if selectedItems are bind multiple="true" is set automatically. I tried it and multiple="true"wasn't set. So I hope some of you can help me finding what I'm not doing well: This is my listbox:

<listbox nonselectableTags="*" id="LBFicheros" multiple="true" checkmark="true" mold="paging" autopaging="true" model="@load(vm.items)" selectedItems="@bind(vm.selected)">

As you can see I'm binding selectedItems Then, this is my java code

private Set <ServidorBean> selected;
public Set<ServidorBean> getSelected() {
       System.out.println("Entra en getSelected");
    return selected;
}
public void setSelected(Set<ServidorBean> selected){
    System.out.println("Entra en setSelected");
    this.selected = selected;
}

With this code multiple selection is not enabled and radiobuttons are shown instead of checkboxes.

If I set multiple="true" in the ListModelList it works OK but I understood (maybe I'm wrong) that it is not necessary if selectedItems are binded.

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