webtier@glassfish.java.net

Re: best-practice identical pages and managed beans

From: <webtier_at_javadesktop.org>
Date: Thu, 13 May 2010 06:26:47 PDT

Hi, i used too to use t:aliasBean and jsp.include to replicate the layout of a page and behviour, or with JSF2 i passed to use Facelets couse is standarized and tomhawk is not supported still in jsf2.
I would create a template page showResults.xhtml where inside i use a variable #{soccerBean}. Than in each tab i would include the page in this way:

  <ui:decorate template = "showResults.xhtml">
     <ui:param name = "soccerBean" value="#{XXXSoccerBean }" >
  </ui:decorate>

Than for specific page contents, inside the tab u can inser content using ui:define, and in the template pag eu can specify where insert contents using ui:insert. See javadocs for more details.

Regards, Daniele
[Message sent by forum member 'tapdani']

http://forums.java.net/jive/thread.jspa?messageID=469690