0

How to catch checkmark event on listbox

asked 2020-03-18 00:20:55 +0800

softteam gravatar image softteam
130 1 8

updated 2020-03-18 00:21:53 +0800

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

delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2020-03-18 07:24:05 +0800

MiguelMdz gravatar image MiguelMdz
9 1

updated 2020-03-19 06:42:14 +0800

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>
link publish delete flag offensive edit
0

answered 2020-03-19 10:35:59 +0800

MDuchemin gravatar image MDuchemin
2560 1 6
ZK Team

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.

link publish delete flag offensive edit
0

answered 2020-03-24 21:59:41 +0800

Max23B0 gravatar image Max23B0
1

updated 2020-03-24 22:00:02 +0800

thx man you helped me

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

Follow

RSS

Stats

Asked: 2020-03-18 00:20:55 +0800

Seen: 16 times

Last updated: Mar 24 '20

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