0

Design Question -

asked 2009-12-11 18:51:51 +0800

wyu gravatar image wyu
45

I am reading some code, in the window class, I am seeing

public void afterCompose() {
Components.wireVariables(this, this);
Components.addForwards(this, this);
}

and some method of the form:

onMethodName$ObjectId

In the controller class, where the apply points to, I am seeing many

onMethodName methods.

To me, it looks like the window class has some responsibility of the controller, and the main controller handles most of the jobs.

My questions is:

1. which gets executed first?

2. no methodname$objectid form event handler accepted in the controller specified by apply clause, is it true?

3. what is the recommendation of how to split up the controller job between window class itself and the controller pointed to by apply clause?


Thanks

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2009-12-13 20:03:18 +0800

joylo0122 gravatar image joylo0122
688 1
www.zkoss.org

@wyu

Hi wyu, i'm not sure what's the window class & controller class means, but you can reference ZK Composer first.

Both onMethodName$ObjectId and onMethodName method are the same way to declare a event handler, i didn't
test which will execute first, cause i don't think we should write codes at two different places in the same action.

/Joy

link publish delete flag offensive edit

answered 2009-12-14 17:18:38 +0800

wyu gravatar image wyu
45

Good read, Thanks

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: 2009-12-11 18:51:51 +0800

Seen: 157 times

Last updated: Dec 14 '09

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