Struts Tiles Tutorial (free Struts training)
Master the Struts Tiles Framework Tutorial (Dec. 2003)
The Tiles framework makes creating reusable pages and visual components
easier. Developers can build Web applications by assembling reusable tiles.
You can use tiles as templates or as visual components.
In some respects, the tile layout is like a display function. First you pass
tile layout parameters to use. The parameters can be simple strings, beans,
or tiles. The parameters become attributes to the tile and get stored in the
tile's tile scope. For its part, the tile scope resembles page scope, and is
less general than request scope. The tile scope lets the tile's user pass
arguments (called attributes) to the tile.
Definitions let you define default parameters for tiles. Definitions can be
defined in JSP or XML. Definitions can extend other definitions similarly to
how a class can extend another class. Moreover, definitions can override
parts of the definition it is extending.
The Tiles framework includes its own RequestProcessor to handle tile layouts
as ActionForwards. Thus you can forward to a tile definition instead of a
JSP if you install the Tiles plug-in.
If you are using Struts but not Tiles, then you are not fully benefiting
from Struts and likely repeat yourself unnecessarily. The Tiles framework
makes creating reusable site layouts and visual components feasible.
In this tutorial you will cover the following:
The Tiles framework and architecture
How to build and use a tile layout as a site template
How to use tile definitions both in XML and JSP
How to move objects in and out of tile scope
How to work with attributes lists
How to nest tiles
How to build and use tile layouts as small visual components
How to subclass a definition
How to create a controller for a tile
How to use a tile as an ActionForward
Struts/J2EE training -- http://www.arc-mind.com/strutsCourse.htm
Struts/J2EE consulting --
To unsubscribe, e-mail: struts-user-unsubscribe@(protected)
For additional commands, e-mail: struts-user-help@(protected)