2009/05/20 - Apache Shale has been retired.

For more information, please explore the Attic.

Shale Tiles Integration

This package contains an optional integration layer for working with standalone Tiles. It has NO dependencies on the remainder of Shale, so the JAR file containing it (shale-tiles.jar) may be used to integrate Tiles with any implementation of JavaServer Faces.

Note: Shale's Tiles integration works only with standalone Tiles, which currently resides in the Struts sandbox (and is soon to be a Top Level Project at Apache). Shale's Tiles integration does not work with Struts Tiles.

Services Provided

Using Shale's Tiles integration is easy: you just include shale-tiles.jar in WEB-INF/lib. For your efforts, for every view ID that you specify for JSF navigation, Shale:

  1. Strips off the view ID's suffix (eg: "/tiles/test.jsp" becomes "/tiles/test")
  2. Searches for a tile with the resulting name, with or without the leading slash (eg: "/tiles/test" or "tiles/test")
  3. Loads the tile if found; otherwise, delegates to the default JSF navigation handler

With Shale's Tiles integration, you can use a tile or a single JSP page to represent a JSF view and your view IDs for navigation are the same for both. For example, you could have a JSP page /login.jsp, that you specify as a view ID for navigation. Later on, you can replace that JSP page with a tile simply by specifying a tile named login in your Tiles definition file. Shale will strip off the .jsp suffix and load the tile instead of the JSP page.

Resources