0

multiple listeners - order of execution

asked 2013-07-18 09:28:53 +0800

meh gravatar image meh
57 1

I have multiple listeners for an event (using mvc) and I would like to specify the order in which they are executed. In the sample code, if the user changes the type radio selection the changeSearchType method should be executed BEFORE the search method. Is there a way to specify the order of execution? I am using zk 6.5.2.

@Listen("onCheck = #typeRadio")
public void changeSearchType() {
    // change the search type
}

@Listen("onCheck = #typeRadio; onClick = #searchButton")
public void search() {
    // execute the search
}
delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-07-22 11:06:51 +0800

vincentjian gravatar image vincentjian
2245 6

Hi

Try the following sample.

@Listen("onCheck = #typeRadio")
public void changeSearchType() {
    // change the search type
    search();
}


@Listen("onClick = #searchButton")
public void search() {
    // execute the search
}
link publish delete flag offensive edit

Comments

Thanks for the suggestion - I will try that once I get a chance to work on the project again.

meh ( 2013-10-14 21:53:52 +0800 )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
1 follower

RSS

Stats

Asked: 2013-07-18 09:28:53 +0800

Seen: 22 times

Last updated: Jul 22 '13

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