Package org.apache.shale.tiles

This package contains an optional integration layer for working with standalone Tiles.

See:
          Description

Class Summary
TilesViewHandler This view handler strips the suffix off of the view ID and looks for a tile whose name matches the resulting string.
 

Package org.apache.shale.tiles Description

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. Shale's Tiles integration does not work with Struts Tiles.

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.



Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.