-
Bug
-
Resolution: Fixed
-
Normal
-
8.0.1
-
Security Level: Jimmy
-
ZK 8.0.2 S1
-
None
I found one issue on selection when the property checkmarkDeselectOthers is active.
After selecting all elements using the checkmark, when user clicks in one item for deselecting others, the selection in server is not updated. I made one video to demonstrate the problem.
In attachment:
- one video demonstrating the problem,
- the zul file and the viewmodel from video.
I was unable to demonstrate this problem in zk sandbox because the property org.zkoss.zul.listbox.checkmarkDeselectOthers must be enabled.
zk.xml
<library-property>
<name>org.zkoss.zul.listbox.checkmarkDeselectOthers</name>
<value>true</value>
</library-property>
ZKBugViewModel.java
public class ZKBugViewModel { private final ListModelList<String> model; public ZKBugViewModel() { this.model = new ListModelList<String>(); for (int i = 1; i < 10; i++) { this.model.add("Value " + i); } this.model.setMultiple(true); } public ListModelList<String> getModel() { return this.model; } }
zkbug.zul
<zk> <window apply="org.zkoss.bind.BindComposer" width="300px" viewModel="@id('vm') @init('com.test.gui.viewmodels.ZKBugViewModel')"> <vlayout> <listbox id="grid" width="450px" height="280px" model="@load(vm.model)" checkmark="true" onSelect='count.setValue("Selected elements count: " + grid.getSelectedCount())'> <listhead> <listheader label="Some title" /> </listhead> <template name="model"> <listitem label="@load(each)" /> </template> </listbox> <label id="count" style="font-size: 20px; font-weight: bold;" onCreate='count.setValue("Selected elements count: " + grid.getSelectedCount())' /> </vlayout> </window> </zk>