META-INF.tld.struts-tiles-el.tld Maven / Gradle / Ivy
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.
]]>
1.4
tiles
http://struts.apache.org/tags-tiles-el
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. <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 :
template
, for inserting a
tiles/component/template page,
component
, for inserting a
tiles/component/template page, (same as template)
page
for inserting a JSP page,
(same as template)
definition
, for inserting a definition from
definitions factory
attribute
, surrounding tiles's attribute name
whose value is used.
If attribute is associated to 'direct' flag (see put),
and flag is true, write attribute value (no insertion).
name
, to let 'insert' determine the type of
entities to insert. In this later case, search is done in
this order : definitions, tiles/components/templates, pages.
In fact, Page, component and template, are equivalent as a tile,
component or template are jsp page.
Example :
<tiles:insert page="/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>
]]>
insert
org.apache.strutsel.taglib.tiles.ELInsertTag
JSP
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.
]]>
template
false
true
java.lang.String
Path (relative or absolute to webapps) of the component to insert.
'page', 'component' and 'template' are synonyms :
they have exactly the same behavior.
]]>
component
false
true
java.lang.String
Path (relative or absolute to webapps) of the page to insert.
'page', 'component' and 'template' are synonyms :
they have exactly the same behavior.
]]>
page
false
true
java.lang.String
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="".
]]>
definition
false
true
java.lang.String
Name of an attribute in current tile/component context.
Value of this attribute is passed to
'name' (see attribute 'name').
]]>
attribute
false
false
java.lang.String
Name of an entity to insert. Search is done in this order :
definition, attribute, [tile/component/template/page].
]]>
name
false
true
java.lang.String
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).
]]>
beanName
false
true
java.lang.String
Bean property name. If specified, value is retrieved from this
property. Supports nested/indexed properties.
]]>
beanProperty
false
true
java.lang.String
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.
]]>
beanScope
false
false
java.lang.String
True or false. If true, current page out stream is flushed before
insertion.
]]>
flush
false
false
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.
]]>
ignore
false
true
boolean
If the user is in the specified role, the tag is taken into account;
otherwise, the tag is ignored (skipped).
]]>
role
false
true
java.lang.String
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.
]]>
controllerUrl
false
true
java.lang.String
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.
]]>
controllerClass
false
true
java.lang.String
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 insert
]]>
definition
org.apache.strutsel.taglib.tiles.ELDefinitionTag
JSP
Specifies the name under which the newly created definition bean
will be saved.
]]>
id
true
false
java.lang.String
Specifies the variable scope into which the newly defined bean
will be created. If not specified, the bean will be created in page
scope.
]]>
scope
false
false
java.lang.String
A string representing the URI of a tile/component/template
(a JSP page).
]]>
template
false
true
java.lang.String
URL of the template / component to insert. Same as "template".
]]>
page
false
true
java.lang.String
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.
]]>
role
false
true
java.lang.String
Name of a parent definition that is used to initialize this new
definition. Parent definition is searched in definitions factory.
]]>
extends
false
true
java.lang.String
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 :
- string : Content is written directly.
- page | template : Content is included from specified URL.
Name is used as an URL.
- definition : Content come from specified definition (from factory).
Name is used as definition name.
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"'.
]]>
put
org.apache.strutsel.taglib.tiles.ELPutTag
JSP
Name of the attribute.
]]>
name
false
false
java.lang.String
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.
]]>
value
false
true
java.lang.String
Content that's put into tile scope. Synonym to value. Attribute
added for compatibility with JSP Template.
]]>
content
false
true
java.lang.String
Determines how content is handled: true means content is
printed direct
]]>
direct
false
false
java.lang.String
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.
]]>
type
false
false
java.lang.String
Name of the bean used as value. Bean is retrieved from specified
context, if any. Otherwise, method pageContext.findAttribute is used.
If beanProperty is specified, retrieve value from the corresponding
bean property.
]]>
beanName
false
true
java.lang.String
Bean property name. If specified, value is retrieve from this
property. Support nested/indexed properties.
]]>
beanProperty
false
true
java.lang.String
Scope into which bean is searched. If not specified, method
pageContext.findAttribute is used.
Scope can be any JSP scope, 'tile', 'component', or 'template'.
In these three later cases, bean is search in tile/component/template
context.
]]>
beanScope
false
false
java.lang.String
If the user is in the specified role, the tag is taken into account;
otherwise, the tag is ignored (skipped).
]]>
role
false
true
java.lang.String
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.
]]>
putList
org.apache.strutsel.taglib.tiles.ELPutListTag
JSP
Name of the list.
]]>
name
true
false
java.lang.String
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.
]]>
add
org.apache.strutsel.taglib.tiles.ELAddTag
JSP
Element value. Can be a String or Object.
]]>
value
false
false
java.lang.String
Element value. Can be a String or Object. Synonym to value.
Attribute added for compatibility with JSP Template.
]]>
content
false
true
java.lang.String
Determines how content is handled: true means content is
printed direct
]]>
direct
false
false
java.lang.String
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.
]]>
type
false
false
java.lang.String
Name of the bean used as value. Bean is retrieved from specified
context, if any. Otherwise, method pageContext.findAttribute is used.
If beanProperty is specified, retrieve value from the corresponding
bean property.
]]>
beanName
false
true
java.lang.String
Bean property name. If specified, value is retrieved from this
property. Supports nested/indexed properties.
]]>
beanProperty
false
true
java.lang.String
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.
]]>
beanScope
false
false
java.lang.String
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.
]]>
role
false
true
java.lang.String
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.
]]>
get
org.apache.strutsel.taglib.tiles.ELGetTag
empty
The name of the content to get from tile/component scope.
]]>
name
true
true
java.lang.String
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.
]]>
ignore
false
true
boolean
True or false. If true, current page out stream is flushed
before insertion.
]]>
flush
false
false
boolean
If the user is in the specified role, the tag is taken into account;
otherwise, the tag is ignored (skipped).
]]>
role
false
true
java.lang.String
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.
]]>
getAsString
org.apache.strutsel.taglib.tiles.ELGetAttributeTag
empty
Attribute name.
]]>
name
true
true
java.lang.String
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.
]]>
ignore
false
true
boolean
If the user is in the specified role, the tag is taken into account;
otherwise, the tag is ignored (skipped).
]]>
role
false
true
java.lang.String
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.
]]>
useAttribute
org.apache.strutsel.taglib.tiles.ELUseAttributeTag
empty
Declared attribute and variable name.
]]>
id
false
false
java.lang.String
Class of the declared variable.
]]>
classname
false
false
java.lang.String
Scope of the declared attribute. Default to 'page'.
]]>
scope
false
false
java.lang.String
Tile's attribute name.
]]>
name
true
true
java.lang.String
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.
]]>
ignore
false
true
boolean
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.
]]>
importAttribute
org.apache.strutsel.taglib.tiles.ELImportAttributeTag
empty
name
false
true
java.lang.String
Scope into which attribute is imported. Default to page.
]]>
scope
false
false
java.lang.String
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.
]]>
ignore
false
true
boolean
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).
]]>
initComponentDefinitions
org.apache.strutsel.taglib.tiles.ELInitDefinitionsTag
empty
Definition file name.
]]>
file
true
false
java.lang.String
If specified, classname of the factory to create and initialized.
]]>
classname
false
false
java.lang.String