0

onClick listener of dynamically rendered listitem using at listen annotation

asked 2012-08-15 03:47:46 +0800

aktejo gravatar image aktejo
155 3

dear zk experts,..

i tried to add a click listener on my dynamically rendered listitem (of listbox) using @Listen annotation,..
but it doesn't work,..


@listen("onClick=listbox listitem")


any body knows how to do that,

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2012-08-17 06:41:13 +0800

hawk gravatar image hawk
2320 1 5
http://hawkphoenix.blogsp... ZK Team

try
@listen("onSelect=listbox")

link publish delete flag offensive edit

answered 2012-08-18 09:32:47 +0800

aktejo gravatar image aktejo
155 3

I tried it already,

but onSelect event has diferrent behaviour than what i expected on a onClick event.

first, it fires on mouse right click, onClick only fires on left mouse click

second, it doesn't fire if the listitem already selected,. while onClick still fires even when the listitem selected already.

link publish delete flag offensive edit

answered 2012-09-06 01:59:17 +0800

hawk gravatar image hawk
2320 1 5
http://hawkphoenix.blogsp... ZK Team

Hi,

I have tested

@Listen("onClick=listbox listitem")
, it works fine as you said. It also fires event when clicking a selected listitem.

link publish delete flag offensive edit
Your reply
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: 2012-08-15 03:47:46 +0800

Seen: 203 times

Last updated: Sep 06 '12

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