| |||||||
FRAMES NO FRAMES |
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles-el" %>
<anyxmlelement xmlns:tiles="http://struts.apache.org/tags-tiles-el" />
This tag library provides tiles tags. Tiles were previously called Components. For historical reasons, names, pages, components and templates are used indifferently to design a tile. Also, a lot of tags and attribute names are left for backward compatibility. To know more about tags defined in this library, check the associated documentation: tiles-doc.
Tag Library Information | |
Display Name | None |
Version | 1.3 |
Short Name | tiles |
URI | http://struts.apache.org/tags-tiles-el |
Tag Summary | |
insert | Insert a tiles/component/template. 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. 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. Example : |
definition | Create a tile /component / template definition bean. Create a tile/component/template definition as a bean. Newly created bean will be saved under specified "id", in the requested "scope". Definition tag has same syntax as |
put | Put an attribute into tile/component/template context. Define an attribute to pass to tile/component/template. This tag can only be used inside 'insert' or 'definition' tag. Value (or content) is specified using attribute 'value' (or 'content'), or using the tag body. It is also possible to specify the type of the value :
If 'type' attribute is not specified, content is 'untyped', unless it comes from a typed bean. Note that using 'direct="true"' is equivalent to 'type="string"'. |
putList | Declare a list that will be pass as attribute to tile. Declare a list that will be pass as attribute to tile. List elements are added using the tag 'add'. This tag can only be used inside 'insert' or 'definition' tag. |
add | Add an element to the surrounding list. Equivalent to 'put', but for list element. Add an element to the surrounding list. This tag can only be used inside putList tag. Value can come from a direct assignment (value="aValue") or from a bean. One of 'value' or 'beanName' must be present. |
get | Gets the content from request scope that was put there by a put tag. Retrieve content from tile context and include it. Take into account the 'type' attribute. |
getAsString | Render the value of the specified tile/component/template attribute to the current JspWriter Retrieve the value of the specified tile/component/template attribute property, and render it to the current JspWriter as a String. The usual toString() conversions is applied on found value. Throw a JSPException if named value is not found. |
useAttribute | Use attribute value inside page. Declare a Java variable, and an attribute in the specified scope, using tile attribute value. Java variable and attribute will have the name specified by 'id', or the original name if not specified. |
importAttribute | Import Tile's attribute in specified context. Import attribute from tile to requested scope. Attribute name and scope are optional. If not specified, all tile attributes are imported in page scope. Once imported, an attribute can be used as any other beans from jsp contexts. |
initComponentDefinitions | Initialize Tile/Component definitions factory. In order to use Tile/Component definitions factory, you need to initialize the factory. This is generally done in a initializing servlet. In particular, it is done in "ComponentActionServlet" if you use it. If you don't initialize factory in a servlet, you can initialize it using this tag. You need to provide the description file name, and optionally the factory classname. Initialization is done only once, at the first call of this tag. Subsequent calls are ignored (tag checks existence of the factory). |
| |||||||
FRAMES NO FRAMES |