-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I have a listbox (ZK 6.0) with checkmark and multiple set to true, with one listcell in each listitem. In this listcell, I have a label with an onClick event listener to set a session variable and then Executions.sendRedirect().
Listbox (checkmark = true) -> Listitem -> Listcell -> Label (with Executions.sendRedirect() in event listener)
The problem is, when I click outside the label (anywhere in the listcell) the onClick event handler of the label is fired.
The intended behavior should be that the checkmark is checked if the user clicks on the listcell (anywhere outside of the label) and a redirect if the user clicks on the label.
I can't use a native hyperlink component instead of a label in this case as I need an event handler perform business logic.
Any ideas? (Is this a bug?)
Thanks,
Richard
Hi Richard,
I've tried to reproduce this problem with the code fragment below on zk fiddle but cannot reproduce it,
could you provide a runnable sample that can reproduce this issue?
<zk> test <listbox checkmark="true" multiple="true"> <listitem> <listcell> <label value="label"> <attribute name="onClick"> Executions.sendRedirect("/test2.zul"); </attribute> </label> </listcell> </listitem> </listbox> </zk>
Thanks
Ben
Asked: 2012-05-30 01:52:13 +0800
Seen: 189 times
Last updated: Jun 06 '12