0

parent from include page

asked 2009-09-17 01:12:16 +0800

lcmuniz2010 gravatar image lcmuniz2010
24

updated 2009-09-17 01:37:15 +0800

How I obtain a reference to a parent page from a page that is included via include tag?
ex:
on page1: <include id="main" src="page2.zul"/>
on page2 (java code): getParent() does not work, returns null.
how i obtain a reference from page1, inside the page2?

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2009-09-17 01:40:17 +0800

lcmuniz2010 gravatar image lcmuniz2010
24

OK. This is a solution. I do know if is efficient but was what I did.
on page1:
page1 = getFellow("page1_id")
main = getFellow("main")
main.getDesktop().setAttribute("page1", page1);
getFellow("main").setSrc("page2");

on page2:
Window page1 = (Window) getDesktop().getAttribute("page1");

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-09-17 01:12:16 +0800

Seen: 206 times

Last updated: Sep 17 '09

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