-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have 3 zul pages.
For example:
Base.zul
Window1.zul
Window2.zul
in Base.zul I have included the others Window1.zul and Window2.zul
In Window2.zul i have a button and in Window1.zul i have a textbox.
I need press the button and then in the textbox must appear one charter.
I'm reading: http://docs.zkoss.org/wiki/Inter_page%2C_app_communication#Inter-Page_Communication
But i don't if the correct form is the exposed in the article.
I try to create an Interface, then Window1 and Window2 are implementing this interface. In the interface we only have one method, for example "public void charter(String text);"
Then i want do this from the Window2.java:
((InterfaceName)((Window)this.getParent())).charter("aaa");
But in runtime the (Window)this.getParent() always is null. Why?, maybe because is an included window we hasn't parent?, but the parent must be the include component, not?
Thank you very much.
did you put include component inside any other component, or it returns null.
you can use getSpaceOwner instead, it returns the page component.
/robbie
Asked: 2009-03-02 16:16:03 +0800
Seen: 169 times
Last updated: Mar 06 '09