META-INF.tld.tiles-core.tld Maven / Gradle / Ivy
Show all versions of tiles-core Show documentation
2.0
1.2
tiles
http://tiles.apache.org/tags-tiles
This tag library provides Tiles tags.
]]>
insertTemplate
org.apache.tiles.taglib.InsertTemplateTag
JSP
Insert a template.
Insert a template with the possibility to pass
parameters (called attributes).
A template can be seen as a procedure that can take parameters or attributes.
<tiles:insertTemplate>
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
template
attribute, for inserting a template
Example :
<tiles:insertTemplate template="/basic/myLayout.jsp" flush="true">
<tiles:put name="title" value="My first page" />
<tiles:put name="header" value="/common/header.jsp" />
<tiles:put name="footer" value="/common/footer.jsp" />
<tiles:put name="menu" value="/basic/menu.jsp" />
<tiles:put name="body" value="/basic/helloBody.jsp" />
</tiles:insert>
]]>
template
true
true
A string representing the URI of a template (for example, a JSP
page).
]]>
flush
false
false
boolean
True or false. If true, current page out stream is flushed
before insertion.
]]>
ignore
false
true
boolean
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.
]]>
role
false
true
If the user is in the specified role, the tag is taken into account;
otherwise, the tag is ignored (skipped).
]]>
preparer
false
true
The fully qualified class name of the preparer.
insertDefinition
org.apache.tiles.taglib.InsertDefinitionTag
JSP
Insert a definition.
Insert a definition with the possibility to override and specify
parameters (called attributes).
A definition can be seen as a (partially or totally) filled template that
can override or complete attribute values.
<tiles:insertDefinition>
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 name
tag attribute, for inserting a definition from
definitions factory.
Example :
<tiles:insertDefinition name=".my.tiles.defininition flush="true">
<tiles:put name="title" value="My first page" />
<tiles:put name="header" value="/common/header.jsp" />
<tiles:put name="footer" value="/common/footer.jsp" />
<tiles:put name="menu" value="/basic/menu.jsp" />
<tiles:put name="body" value="/basic/helloBody.jsp" />
</tiles:insertDefinition>
]]>
name
true
true
Name of the definition to insert.
]]>
flush
false
false
boolean
True or false. If true, current page out stream is flushed
before insertion.
]]>
ignore
false
true
boolean
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.
]]>
role
false
true
If the user is in the specified role, the tag is taken into account;
otherwise, the tag is ignored (skipped).
]]>
preparer
false
true
The fully qualified class name of preparer.
insertAttribute
org.apache.tiles.taglib.InsertAttributeTag
JSP
Inserts the value of an attribute into the page.
This tag can be flexibly used to insert the value of an attribute into a page.
As in other usages in Tiles, every attribute can be determined to have a "type",
either set explicitly when it was defined, or "computed". If the type is not explicit, then
if the attribute value is a valid definition, it will be inserted as such. Otherwise,
if it begins with a "/" character, it will be treated as a "template". Finally, if it
has not otherwise been assigned a type, it will be treated as a String and included without
any special handling.
Example :
]]>
name
false
true
Name of the attribute to insert. This attribute will be ignored if
the value
attribute is specified.
]]>
value
false
true
Attribute object to render directly. If it specified, the name
attribute will be ignored.
]]>
flush
false
false
boolean
True or false. If true, current page out stream is flushed
before insertion.
]]>
ignore
false
true
boolean
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.
]]>
role
false
true
If the user is in the specified role, the tag is taken into account;
otherwise, the tag is ignored (skipped).
]]>
preparer
false
true
The fully qualified name of the preparer.
definition
org.apache.tiles.taglib.definition.DefinitionTag
JSP
Create a template definition bean.
Create a template definition as a bean.
Newly created bean will be saved under specified "id", in the requested "scope".
Definition tag has same syntax as insert
]]>
name
true
true
Specifies the name under which the newly created definition bean
will be saved.
]]>
scope
false
false
Specifies the variable scope into which the newly defined bean
will be created.
If not specified, the bean will be created in page scope.
]]>
template
false
true
A string representing the URI of a template
(a JSP page).
]]>
role
false
true
Role to check before inserting this definition. If role is not
defined for current user, definition is not inserted. Checking is
done at insert time, not during definition process.
]]>
extends
false
true
Name of a parent definition that is used to initialize this new
definition. Parent definition is searched in definitions factory.
]]>
putAttribute
org.apache.tiles.taglib.PutAttributeTag
JSP
Put an attribute in enclosing attribute container tag.
Enclosing attribute container tag can be :
- <initContainer>
- <definition>
- <insertAttribute>
- <insertDefinition>
- <putListAttribute>
(or any other tag which implements the {@link PutAttributeTagParent}
interface.
Exception is thrown if no appropriate tag can be found.
Put tag can have following atributes :
- name : Name of the attribute
- value : value to put as attribute
- type : value type. Only valid if value is a String and is set by
value="something" or by a bean.
Possible type are : string (value is used as direct string),
template (value is used as a page url to insert),
definition (value is used as a definition name to insert)
- direct : Specify if value is to be used as a direct string or as a
page url to insert. This is another way to specify the type. It only apply
if value is set as a string, and type is not present.
- beanName : Name of a bean used for setting value. Only valid if value is not set.
If property is specified, value come from bean's property. Otherwise, bean
itself is used for value.
- beanProperty : Name of the property used for retrieving value.
- beanScope : Scope containing bean.
- role : Role to check when 'insert' will be called. If enclosing tag is
<insert>, role is checked immediately. If enclosing tag is
<definition>, role will be checked when this definition will be
inserted.
Value can also come from tag body. Tag body is taken into account only if
value is not set by one of the tag attributes. In this case Attribute type is
"string", unless tag body define another type.
]]>
name
true
true
Name of the attribute.
]]>
value
false
true
Attribute value. Could be a String or an Object.
Value can come from a direct assignment (value="aValue") or from a bean.
One of 'value' 'content' or 'beanName' must be present.
]]>
type
false
false
Specify content type: string, page, template or definition.
- String : Content is printed directly.
- page | template : Content is included from specified URL. Name is used as an URL.
- definition : Value is the name of a definition defined in factory (xml file). Definition will be searched
in the inserted tile, in a
<tiles:insert attribute="attributeName">
tag, where 'attributeName'
is the name used for this tag.
]]>
role
false
true
If the user is in the specified role, the tag is taken into account;
otherwise, the tag is ignored (skipped).
]]>
putListAttribute
org.apache.tiles.taglib.PutListAttributeTag
JSP
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.
]]>
name
true
true
Name of the list.
]]>
addAttribute
org.apache.tiles.taglib.AddAttributeTag
JSP
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.
]]>
value
false
true
Element value. Can be a String or Object.
]]>
type
false
false
Specify content type: string, page, template or instance.
- String : Content is printed directly.
- page | template : Content is included from specified URL. Name is used as an URL.
- definition : Value denote a definition defined in factory (xml file). Definition will be searched
in the inserted tile, in a
<insert attribute="attributeName">
tag, where 'attributeName'
is the name used for this tag.
]]>
role
false
true
If the user is in the specified role, the tag is taken into account;
otherwise, the tag is ignored (skipped).
The role isn't taken into account if <add>
tag is used in a definition.
]]>
addListAttribute
org.apache.tiles.taglib.AddListAttributeTag
JSP
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.
]]>
getAsString
org.apache.tiles.taglib.GetAsStringTag
empty
Render the value of the specified template attribute to the current JspWriter
Retrieve the value of the specified 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.
]]>
name
true
true
Attribute name.
]]>
ignore
false
true
boolean
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.
]]>
role
false
true
If the user is in the specified role, the tag is taken into account;
otherwise, the tag is ignored (skipped).
]]>
useAttribute
org.apache.tiles.taglib.UseAttributeTag
org.apache.tiles.taglib.UseAttributeTag$Tei
empty
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.
]]>
id
false
true
Declared attribute and variable name.
]]>
classname
false
true
Class of the declared variable.
]]>
scope
false
false
Scope of the declared attribute. Default to 'page'.
]]>
name
true
true
Tile's attribute name.
]]>
ignore
false
true
boolean
If this attribute is set to true, and the attribute specified by the name
does not exist, simply return without error. The default value is false, which will
cause a runtime exception to be thrown.
]]>
importAttribute
org.apache.tiles.taglib.ImportAttributeTag
empty
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.
]]>
name
false
true
Tile's attribute name. If not specified, all attributes are
imported.
]]>
toName
false
true
Name of the destination attribute. If not specified, the name will
be the same as specified in name
attribute
]]>
scope
false
false
Scope into which attribute is imported. Default to page.
]]>
ignore
false
true
boolean
If this attribute is set to true, and the attribute specified by
the name does not exist, simply return without error. The default
value is false, which will cause a runtime exception to be thrown.
]]>
initContainer
org.apache.tiles.taglib.definition.InitContainerTag
JSP
Initialize the TilesContainer.
In order to use the Tiles system, a TilesContainer must be instantiated.
This initialization is generally done by the TilesListener (or perhaps the
TilesServlet or TilesFilter).
If the intialization needs to be dynamic, you can initialize the container using
this tag. Realize however, that this tag MUST be executed prior to invoking
any other definitions. Additionally, the initilization may only be done once,
and any subsequent invocations will be ignored.
]]>
containerFactory
false
true
Container Factory implementation used to instantiate the container. ]]>
destroyContainer
org.apache.tiles.taglib.definition.DestroyContainerTag
empty
Destroy the TilesContainer.
]]>