-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Is there any way to access the instance created by the apply property when we create components with "Executions.createComponents(...)".
I what to use the controller to interact directly insted of use events/messages that are not type safe.
Using "Events.sendEvent(new Event(...))" is not very elegant when I just want to set a property.
I use ZK 3.6.4 version.
you can save the instance to the desktop
(in doAfterCompose)
desktop.setAttribute("myPorductComposer", this);
Nice. You give me an idea.
Since I am using a my own GenericController extending the GenericForwardComposer, I can put it in the component:
comp.setAttribute("controller", this);
and then when creating the component:
Window comp = (Window) Executions.createComponents(...); Controller controller = (Controller) comp.getAttribute("controller");
in my web application, i have several region of page, each of them control different things.
i gave each of them a ZUL + Composer and save them all into the desktop, then i can communication with each other zul
by using composer and Executions.createComponents(another zul), i use extends technology and autowire by my self
i have a composer and a customized window --> productWindow
In Composer
productWindow pw = new productWindow();
In productWindow
public class productWindowextends Window { private textbox txtb; //<----------autowired by my self ( actual, it's in the subData.zul) private textbox txtbValue; //<----------autowired by my self ( actual, it's in the subData.zul) public productWindow(){ Executions.createComponents("subData.zul", this, null); Components.wireVariables(this, this); //i do the wire Components.addForwards(this, this, '$'); }
Asked: 2010-10-13 08:03:00 +0800
Seen: 333 times
Last updated: Oct 14 '10