Chapter 13: Using Tiles

 < Day Day Up > 



Overview

In this chapter, we look at using Tiles to create reusable presentation components. The Tiles framework was originally called Components. The name was nixed because it was too common—it means too many things to too many people. But the spirit of the name remains. With Tiles, you can compartmentalize your presentation tier to achieve greater reuse of layouts, HTML, and other visual components. You build these visual components in JSPs using custom tags and Java scriptlets.

start sidebar

In this chapter, we use the term Tile and page interchangeably. This is because any Web resource can be a Tile. A Tile layout is a special type of Tile that you can use to hold other Tiles. A Tile layout can be used as a Tile in another Tile layout.

end sidebar

The goals of this chapter are to:

  • Define the Tiles framework and architecture.

  • Cover the Tile architecture and how it integrates with Struts.

  • Clarify key concepts in Tiles.

  • Demonstrate how to build and use a Tile layout as a site template.

  • Show how to use Tile definitions both in XML and JSP.

  • Define Tile scope and show how to move objects in and out of scope.

  • Work with lists of attributes.

  • Demonstrate how to nest Tiles.

  • Show how to build and use a Tile layout as small visual components.

  • Examine how to subclass a definition.

  • Create a Controller for a Tile.

  • Demonstrate using a Tile as an ActionForward.



 < Day Day Up > 



Professional Jakarta Struts
Professional Jakarta Struts (Programmer to Programmer)
ISBN: 0764544373
EAN: 2147483647
Year: 2003
Pages: 183

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net