previous | index | next

Nesting Tiles

To nest a tile in another, put its name in the other's definition:
   <definition name="book" path="/headerMenuContentLayout.jsp">
      <put name="header"  value="/bookHeader.jsp"/>
      <put name="menu"    value="/bookMenu.jsp"/>
      <put name="content" value="/bookContent.jsp"/>
   </definition>

   <definition name="library" path="/libraryLayout.jsp"
         controllerClass="com.corejsf.LibraryTileController">
      <put name="header" value="/bookSelector.jsp"/>
      <put name="book" value="book"/>
   </definition>

Note that the value of the book attribute is a tile, not a JSP page.

Note also the specification of a library tile controller class.

Here are the libraryLayout.jsp and bookSelector.jsp pages, and the Library class.


previous | index | next