tiles-config_2_1.dtd
: Elements - Entities - Source | Intro - Index
FRAMES / NO FRAMES
Usage: <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN" "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
$Id: tiles-config_2_1.dtd 736275 2009-01-21 09:58:20Z apetrelli $ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
<tiles-definitions> | Root element |
The "tiles-definitions" element is the root of the configuration file hierarchy, and contains nested elements for all of the other configuration settings.
Element's model:
<tiles-definitions>'s children Name Cardinality definition At least one
(definition+)
<definition> | Child of tiles-definitions, put-attribute, add-attribute |
The "definition" element describes a definition that can be inserted in a jsp page. This definition is identified by its logical name. A definition allows to define all the attributes that can be set in <insert> tag from a jsp page.
Element's model:
<definition>'s children Name Cardinality description One or none display-name One or none icon One or none put-attribute Any number put-list-attribute Any number
<definition>'s attributes Name Values Default extends id Match the ID rules. name preparer role template templateExpression templateType
(icon?, display-name?, description?, put-attribute*, put-list-attribute*)
@id | Attribute of definition |
Element identifier.
Possible values: Match the ID rules.
@preparer | Attribute of definition |
The fully qualified Java class name of the preparer subclass to call immediately before the tiles is inserted. Only one of preparerClass or preparerUrl should be specified.
@extends | Attribute of definition |
Name of a definition that is used as ancestor of this definition. All attributes from the ancestor are available to the new definition. Any attribute inherited from the ancestor can be overloaded by providing a new value.
@name | Attribute of definition |
The unique identifier for this definition. Required when it is a root definition, while it is implied in nested definitions.
@role | Attribute of definition |
Security role name that is allowed access to this definition object. The definition is inserted only if the role name is allowed.
@template | Attribute of definition |
The context-relative path to the resource used as tiles to insert. This tiles will be inserted and a tiles context containing appropriate attributes will be available.
@templateExpression | Attribute of definition |
The expression that will evaluate to a template for this definition. This attribute will be ignored if template is specified.
@templateType | Attribute of definition |
The type of the template attribute. Can be: string, template or definition. By default, the type is "template". If a type is associated, the desidered renderer will be invoked.
<put-attribute> | Child of definition |
The "put-attribute" element describes an attribute of a definition. It allows to specify the tiles attribute name and its value. The tiles value can be specified as an xml attribute, or in the body of the <put-attribute> tag.
Element's model:
<put-attribute>'s children Name Cardinality definition Any number
<put-attribute>'s attributes Name Values Default cascade true, false expression id Match the ID rules. name role type value
((definition*))
@id | Attribute of put-attribute |
Element identifier.
Possible values: Match the ID rules.
@name | Attribute of put-attribute |
The unique identifier for this put-attribute.
Required
@type | Attribute of put-attribute |
The type of the value. Can be: string, template or definition. By default, no type is associated to a value. If a type is associated, it will be used as a hint to process the value when the attribute will be used in the inserted tiles.
@value | Attribute of put-attribute |
The value associated to this tiles attribute. The value should be specified with this tag attribute, or in the body of the tag.
@expression | Attribute of put-attribute |
The expression associated to this tiles attribute. This attribute will be ignored if value is specified.
@role | Attribute of put-attribute |
Security role name that is allowed access to this attribute object. The attribute is inserted only if the role name is allowed.
@cascade | Attribute of put-attribute |
If true, the attribute will be cascaded to all inner definitions. By default, cascade is false.
Possible values: true, false
<put-list-attribute> | Child of definition |
The "put-list-attribute" element describes a list attribute of a definition. It allows to specify an attribute that is a java List containing any kind of values. In the config file, the list elements are specified by nested <add-attribute>, <item> or <add-list-attribute>.
Element's model:
<put-list-attribute>'s children Name Cardinality add-attribute Any number add-list-attribute Any number bean Any number item Any number
<put-list-attribute>'s attributes Name Values Default cascade true, false id Match the ID rules. inherit true, false name role
((add-attribute* | item* | bean* | add-list-attribute*)+)
@id | Attribute of put-list-attribute |
Element identifier.
Possible values: Match the ID rules.
@name | Attribute of put-list-attribute |
The unique identifier for this put attribute list.
Required
@role | Attribute of put-list-attribute |
Security role name that is allowed access to this attribute object. The attribute is inserted only if the role name is allowed.
@inherit | Attribute of put-list-attribute |
If true, the attribute will put the elements of the attribute with the same name of the parent definition before the ones specified here. By default, it is 'false'.
Possible values: true, false
@cascade | Attribute of put-list-attribute |
If true, the attribute will be cascaded to all inner definitions. By default, cascade is false.
Possible values: true, false
<add-attribute> | Child of add-list-attribute, put-list-attribute |
The "add-attribute" element describes an element of a list. It is similar to the <put> element.
Element's model:
<add-attribute>'s children Name Cardinality definition Any number
<add-attribute>'s attributes Name Values Default expression id Match the ID rules. role type value
((definition*))
@id | Attribute of add-attribute |
Element identifier.
Possible values: Match the ID rules.
@type | Attribute of add-attribute |
The type of the value. Can be: string, template or definition. By default, no type is associated to a value. If a type is associated, it will be used as a hint to process the value when the attribute will be used in the inserted tiles.
@value | Attribute of add-attribute |
The value associated to this tiles attribute. The value should be specified with this tag attribute, or in the body of the tag.
@expression | Attribute of add-attribute |
The expression associated to this tiles attribute. This attribute will be ignored if value is specified.
@role | Attribute of add-attribute |
Security role name that is allowed access to this attribute object. The attribute will be added to the parent list anyway. It is delegated to the user of this attribute to use it or not depending on the role of the user.
<add-list-attribute> | Child of put-list-attribute |
The "add-list-attribute" element describes a list attribute subordinate to another list attribute. It allows to specify an attribute value that is a java List containing any kind of values. In the config file, the list elements are specified by nested <add-attribute>, <item> or <add-list-attribute>.
Element's model:
<add-list-attribute>'s children Name Cardinality add-attribute Any number add-list-attribute Any number bean Any number item Any number
<add-list-attribute>'s attributes Name Values Default id Match the ID rules. role
((add-attribute* | item* | bean* | add-list-attribute*)+)
@id | Attribute of add-list-attribute |
Element identifier.
Possible values: Match the ID rules.
@role | Attribute of add-list-attribute |
Security role name that is allowed access to this attribute object. The attribute will be added to the parent list anyway. It is delegated to the user of this attribute to use it or not depending on the role of the user.
<bean> | Child of add-list-attribute, put-list-attribute |
The "bean" element describes an element of a list. It create a bean of the specified java classtype. This bean is initialized with appropriate nested <set-property>.
Element's model:
<bean>'s children Name Cardinality set-property Any number
<bean>'s attributes Name Values Default classtype id Match the ID rules.
(set-property*)
@id | Attribute of bean |
Element identifier.
Possible values: Match the ID rules.
@classtype | Attribute of bean |
The fully qualified classname for this bean.
Required
<set-property/> | Child of bean |
The "set-property" element specifies the method name and initial value of a bean property. When the object representing the surrounding element is instantiated, the accessor for the indicated property is called and passed the indicated value.
<set-property>'s attributes Name Values Default id Match the ID rules. property value
This element is always empty.
@id | Attribute of set-property |
Element identifier.
Possible values: Match the ID rules.
@property | Attribute of set-property |
Name of the JavaBeans property whose setter method will be called.
Required
@value | Attribute of set-property |
String representation of the value to which this property will be set, after suitable type conversion
Required
<item> | Child of add-list-attribute, put-list-attribute |
The "item" element describes an element of a list. It create a bean added as element to the list. Each bean can contain different properties: value, link, icon, tooltip. These properties are to be interpreted by the jsp page using them. By default the bean is of type "org.apache.struts.tiles.beans.SimpleMenuItem". This bean is useful to create a list of beans used as menu items.
<item>'s attributes Name Values Default classtype icon id Match the ID rules. link tooltip value
@id | Attribute of item |
Element identifier.
Possible values: Match the ID rules.
@classtype | Attribute of item |
The fully qualified classtype for this bean. If specified, the classtype must be a subclass of the interface "org.apache.struts.tiles.beans.MenuItem".
@icon | Attribute of item |
The bean 'icon' property.
@link | Attribute of item |
The bean 'link' property.
Required
@tooltip | Attribute of item |
The bean 'tooltip' property.
@value | Attribute of item |
The bean 'value' property.
Required
<description> | Child of definition |
The "description" element contains descriptive (paragraph length) text about the surrounding element, suitable for use in GUI tools.
<description>'s attributes Name Values Default id Match the ID rules.
@id | Attribute of description |
Element identifier.
Possible values: Match the ID rules.
<display-name> | Child of definition |
The "display-name" element contains a short (one line) description of the surrounding element, suitable for use in GUI tools.
<display-name>'s attributes Name Values Default id Match the ID rules.
@id | Attribute of display-name |
Element identifier.
Possible values: Match the ID rules.
<icon> | Child of definition |
The "icon" element contains a small-icon and large-icon element which specify the location, relative to the Struts configuration file, for small and large images used to represent the surrounding element in GUI tools.
Element's model:
<icon>'s children Name Cardinality large-icon One or none small-icon One or none
<icon>'s attributes Name Values Default id Match the ID rules.
(small-icon?, large-icon?)
@id | Attribute of icon |
Element identifier.
Possible values: Match the ID rules.
<large-icon> | Child of icon |
The "large-icon" element specifies the location, relative to the Struts configuration file, of a resource containing a large (32x32 pixel) icon image.
<large-icon>'s attributes Name Values Default id Match the ID rules.
@id | Attribute of large-icon |
Element identifier.
Possible values: Match the ID rules.
<small-icon> | Child of icon |
The "small-icon" element specifies the location, relative to the Struts configuration file, of a resource containing a small (16x16 pixel) icon image.
<small-icon>'s attributes Name Values Default id Match the ID rules.
@id | Attribute of small-icon |
Element identifier.
Possible values: Match the ID rules.