JSF integration with Tile
843842Jul 21 2004 — edited Aug 3 2005hi there,
i have been trying to figure out how to use Tile seamlessly in JSF. i have read the "core javaserver faces" book (chapter 8). it appears to me that there is no easy way to use a tile definition as a JSF navigation destination (which can be done in Struts/Tiles combination, where you specify a tile layout as an action result.) this leads to the "wrapper" jsf page whose sole purpose is to refer to the tile layout.
e.g. assume you have a layout "customerSearch" defined like this:
<definition name="baseLayout" path="/baseLayout.jsp">
<put name="header" value="header.jsp"/>
<put name="footer" value="footer.jsp"/>
<put name="leftPane" value="leftPane.jsp"/>
</definition>
<definition name="customerSearch" extends="baseLayout">
<put name="rightPane" value="_customerSearch.jsp"/>
</definition>
baseLayout is composed of 4 tiles. the customerSearch layout has customized "rightPane" tile, which is the real JSF form and everything.
in order to load the layout, you would need a "wrapper" JSF page, e.g. customerSearch.jsp:
<f:view>
<head>
</head>
<body>
<f:subview id="search">
<tiles:insert definition="customerSearch" flush="false"/>
</f:subview>
</body>
</f:view>
then you can access customerSearch.jsp, which loads the tile layout which is customized in the real JSF page _customerSearch.jsp.
is there anyway to access the tile layout "customerSearch" directly in JSF? is there any other way around it? thanks in advance.