Defining Reusable Layout
There are two uses of the tiles:insert tag:
- With the definition attribute, it inserts a defined tile into a
page
- With the attribute attribute, it inserts dynamically included
content into a tile
To make a layout generic and reusable, replace problem-specific JSF code with
tiles:insert elements that refer to specific tile attributes from when
the tile was defined.
Compare:
The first page is headerMenuContentLayout.jsp, referred to in the tile
definition previously.
If there were 6000 books in the library, only
headerMenuContentLayout.jsp would have to be changed to give them all
a footer.