Insert a tiles/component/template with the possibility to pass parameters
(called attribute).
A tile can be seen as a procedure that can take parameters or attributes.
<tiles:insert>
allows to define these attributes and pass them to the inserted jsp page,
called template.
Attributes are defined using nested tag <tiles:put>
or
<tiles:putList>
.
You must specify one of this tag attribute :
In fact, Page, component and template, are equivalent as a tile, component or template are jsp page.
Attribute Name |
Description |
template |
A string representing the URI of a tile or template (a JSP page).
'page', 'component' and 'template' are synonyms : they have exactly the same behavior.
[RT Expr]
|
component |
Path (relative or absolute to webapps) of the component to insert.
'page', 'component' and 'template' are synonyms : they have exactly the same behavior.
[RT Expr]
|
page |
Path (relative or absolute to webapps) of the page to insert.
'page', 'component' and 'template' are synonyms : they have exactly the same behavior.
[RT Expr]
|
definition |
Name of the definition to insert. Definition are defined in a centralized file.
For now, only definition from factory can be inserted with this attribute.
To insert a definition defined with tag <tiles:definition>, use beanName="".
[RT Expr]
|
attribute |
Name of an attribute in current tile/component context. Value of this attribute is passed to
'name' (see attribute 'name').
|
name |
Name of an entity to insert. Search is done in this order : definition, attribute,
[tile/component/template/page].
[RT Expr]
|
beanName |
Name of the bean used as value. Bean is retrieved from specified context, if any. Otherwise,
method pageContext.findAttribute is used.
If beanProperty is also specified, retrieve value from the corresponding bean property.
If found bean (or property value) is instance of one of Attribute class (Direct,
Instance, ...), insertion is done according to the class type. Otherwise, the toString method is
called on the bean, and returned String is used as name to insert (see 'name' attribute).
[RT Expr]
|
beanProperty |
Bean property name. If specified, value is retrieve from this property. Support nested/indexed
properties.
[RT Expr]
|
beanScope |
Scope into which bean is searched. If not specified, method pageContext.findAttribute is used.
Scope can be any JSP scope, 'component', or 'template'.
In these two later cases, bean is search in tile/component/template context.
|
flush |
True or false. If true, current page out stream is flushed before insertion.
|
ignore |
If this attribute is set to true, and the attribute specified by the name
does not exist, simply return without writing anything. The default value is false, which will
cause a runtime exception to be thrown.
[RT Expr]
|
role |
If the user is in the specified role, the tag is taken into account;
otherwise, the tag is ignored (skipped).
[RT Expr]
|
controllerUrl |
Url of a controller called immediately before page is inserted.
Url usually denote a Struts action. Controller (action) is used to prepare data
to be render by inserted Tile.
See also controlerClass. Only one of controllerUrl or controllerClass should be used.
[RT Expr]
|
controllerClass |
Class type of a controller called immediately before page is inserted.
Controller is used to prepare data to be render by inserted Tile.
See also controlerUrl
Class must implements or extends one of the following :
- org.apache.struts.tiles.Controller
- org.apache.struts.tiles.ControllerSupport
- org.apache.struts.action.Action (wrapper org.apache.struts.action.ActionController is used)
See also controllerUrl. Only one of controllerUrl or controllerClass should be used.
[RT Expr]
|