,ch14.9433 Page 445 Monday, February 14, 2005 12:55 PM
Example 14 5. Extending a new definition from a base definition
" //Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
With Tiles, you can base a Tile definition on the definition of another Tile. The new
definition, which extends the base definition, inherits the attributes of the base defi
nition and overrides attributes as needed. When using Tiles, developers commonly
use the approach shown in the Solution. The
definition defines the
basic layout to be used across the application. In object oriented terms, you can
think of the base definition as an abstract class. The
. These definitions are like concrete subclasses of the abstract
definition overrides two attributes:
. The overridden
specifies title text appropriate for the Start page. The
attribute in the base
does not specify a value; think of it as an abstract property. The
definition overrides the
attribute by specifying a concrete value, a JSP page.
definition, which extends the
definition, overrides the
attribute and sets the
Extending Tile Definitions | 445
This is the Title of the Book, eMatter Edition
Copyright 2005 O'Reilly & Associates, Inc. All rights reserved.