label remove eventListener

asked 2014-03-12 16:17:26 +0800

javiut gravatar image javiut flag of Venezuela, Bolivarian Republic of
90 1 5

i have a label in a zul like this

 <label id="avalaibleLabel" value="Avalaible" onClick='controller.doAction();'/>

but later i need sometimes delete the onClick event how can i do this?

i am using MVC

any help is hugely appreciate..

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-03-12 20:21:41 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9

Well I should add the eventlistener in the doAfterCompose of your controller. like this :

private EventListener buttonOnClickListener;

public void doAfterCompose (Component comp) throws Exception {
    buttonOnClickListener = new EventListener() {
             public void onEvent(Event event) throws Exception {
                 //your code               
     // with mvc this button you must still wired it in your class(I don't put that code here))

public void removeEventListener() {

so simpel as that.

Greetz chill.

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

1 follower



Asked: 2014-03-12 16:17:26 +0800

Seen: 10 times

Last updated: Mar 12 '14

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