tiles
Tag putAttribute
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.
Tag Information |
Tag Class | org.apache.tiles.jsp.taglib.PutAttributeTag |
TagExtraInfo Class | None |
Body Content | JSP |
Display Name | None |
Attributes |
Name | Required | Request-time | Type | Description |
name | true | true | java.lang.String | Name of the attribute. |
value | false | true | 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. |
type | false | false | java.lang.String | Specify content type: string, template or definition. - String : Content is printed directly.
- template : Content is included from specified URL. Value 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 | java.lang.String | If the user is in the specified role, the tag is taken into account; otherwise, the tag is ignored (skipped). |
Variables |
No Variables Defined. |
Output Generated by
Tag Library Documentation Generator.
Java, JSP, and JavaServer Pages are trademarks or
registered trademarks of Sun Microsystems, Inc. in the US and other
countries. Copyright 2002-4 Sun Microsystems, Inc.
4150 Network Circle
Santa Clara, CA 95054, U.S.A.
All Rights Reserved.