Our application has a base page and we use markup inheritance.
In the base page we have a headerWe call it HeaderPanel.
HeaderPanel has MainTabsPanel, which consists with the menu links.

The situation now is that for each page, the HeaderPanel and MainTabsPanel
are constructed in each page (because of the markup inheritance).
This is what we have in the base page constructor:
HeaderPanel headerPanel = new HeaderPanel("headerPanel", this);
And this is in the HeaderPanel constructor:
add(new MainTabsPanel("mainTabs"));

For some reasons I want the MainTabsPanel to be constructed only once.

So, instead of adding using new, I want something like:
add(mySession.getMainTabsPanel());
or
add(myApplication.getMainTabsPanel());

Which one is better or is there even something better than this?



Eyal Golan
[EMAIL PROTECTED]

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary

Reply via email to