0

afterCompose question

asked 2009-02-05 10:49:34 +0800

zedkey gravatar image zedkey
138 1 1 3

hi,
i have a macro component, which is included in different pages. now I'd like to do some initialization WHENEVER this component is instantiated in a given page. Unfortunately, it seems that afterCompose is called once (sometime twice?), but not for all activation. Is there a lifecycle callback which does just what I need?

My component class:

public class MyMacro extends HtmlMacroComponent implements AfterCompose { ... }

thanks a lot

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2009-02-06 00:53:06 +0800

iantsai gravatar image iantsai
2755 1

Why not use ZK Initiator in your Zul page?

Then, every time your macro is being constructed, you can do something in init() method.

link publish delete flag offensive edit

answered 2009-02-06 07:05:14 +0800

zedkey gravatar image zedkey
138 1 1 3

you mean the init class of the macro page, don't you?
thanks for the hint!

link publish delete flag offensive edit

answered 2009-02-09 01:36:29 +0800

iantsai gravatar image iantsai
2755 1

Your welcome, and please give this discussion a short response when you succeeded. I think it will be helpful for others.

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-02-05 10:49:34 +0800

Seen: 312 times

Last updated: Feb 09 '09

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