|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Composer
Represents a composer to initialize a component (or a component of tree) when ZK loader is composing a component. It is the controller in the MVC pattern, while the component is the view.
To initialize a component, you can implement this interface and then specify the class or an instance of it with the apply attribute as follows.
<window apply="my.MyComposer"/>
<window apply="${a_composer}"/>
Then, ZK loader will
ComposerExt.doBeforeCompose(org.zkoss.zk.ui.Page, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.metainfo.ComponentInfo), if the composer
also implements ComposerExt.UiFactory.newComponent(org.zkoss.zk.ui.Page, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.metainfo.ComponentInfo), which creates
and initializes the component accordingly).
ComposerExt.doBeforeComposeChildren(org.zkoss.zk.ui.Component), if
ComposerExt is also implemented.doAfterCompose(org.zkoss.zk.ui.Component) after all children are, if any,
composed.To intercept the lifecycle of the creation of a page,
implement Initiator and specify the class with the init directive.
Note: AfterCompose has to be implemented
as part of a component, while Composer is a controller used
to initialize a component (that might or might not implement
AfterCompose).
AfterCompose,
ComposerExt,
FullComposer,
Initiator| Method Summary | |
|---|---|
void |
doAfterCompose(Component comp)
Invokes after ZK loader creates this component, initializes it and composes all its children, if any. |
| Method Detail |
|---|
void doAfterCompose(Component comp)
throws java.lang.Exception
comp - the component has been composed
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||