-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello,
I want to know if it is possible to catch the checkmark event when the user mark all rows by clicking listheader check in .java.
I got a listbox with:
<listbox multiple="true" checkmark="true">
And I want to know if I can catch the event with a listener like I do with paging: @Listen ("onPaging = #ListboxID")
Thanks in advance!
Javier
Using a GroupList is a one option, or yo can does whit onChange or onSelect whit implementing a variable in the consumption method. The easy mode is:
<zk>
<button label="Toggle checkmark" onClick="box.checkmark = !box.checkmark"/>
<listbox id="box" multiple="true" checkmark="true">
<listhead>
<listheader label="Name"/>
<listheader label="Gender"/>
<listheader label="Age"/>
<listheader label="Description"/>
</listhead>
<listitem>
<listcell label="Mary"/>
<listcell label="FEMALE"/>
<listcell label="18"/>
<listcell label="A young lady."/>
</listitem>
<listitem>
<listcell label="John"/>
<listcell label="MALE"/>
<listcell label="20"/>
<listcell label="A college student."/>
</listitem>
<listitem>
<listcell label="Jane"/>
<listcell label="FEMALE"/>
<listcell label="32"/>
<listcell label="A remarkable artist."/>
</listitem>
<listitem>
<listcell label="Henry"/>
<listcell label="MALE"/>
<listcell label="29"/>
<listcell label="A graduate."/>
</listitem>
</listbox>
</zk>
Hi Javier,
yes, you can just listen to the "check all" checkmark with: @Listen ("onCheckSelectAll= #ListboxID")
and to listen to individual row selection: @Listen ("onSelect = #ListboxID")
You can find more info on those in the doc here.
thx man you helped me
Asked: 2020-03-18 00:20:55 +0800
Seen: 16 times
Last updated: Mar 24 '20
Ctrlkey pgdn/pgup does not work for listbox
How to get the deselected items on the onSelect event
Listbox's onCheck event should not be triggered when clicking the row
Sign out all desktops in a Session
ZK how to stop OnClick event of tab? [closed]
Execute Javascript on component visible