0

Another interpage comunication question

asked 2009-03-02 16:16:03 +0800

franferri gravatar image franferri
48 2

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.

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2009-03-06 12:03:22 +0800

robbiecheng gravatar image robbiecheng
1144 2
http://robbiecheng.sys-co...

did you put include component inside any other component, or it returns null.
you can use getSpaceOwner instead, it returns the page component.

/robbie

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-03-02 16:16:03 +0800

Seen: 169 times

Last updated: Mar 06 '09

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