|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tiles.template.InsertAttributeModel
public class InsertAttributeModel
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 :
<code> <tiles:insertAttribute name="body" /> </code>
Constructor Summary | |
---|---|
InsertAttributeModel(AttributeResolver attributeResolver)
Constructor. |
Method Summary | |
---|---|
void |
end(ArrayStack<java.lang.Object> composeStack,
TilesContainer container,
boolean ignore,
java.lang.Object... requestItems)
Ends the operation. |
void |
execute(TilesContainer container,
boolean ignore,
java.lang.String preparer,
java.lang.String role,
java.lang.Object defaultValue,
java.lang.String defaultValueRole,
java.lang.String defaultValueType,
java.lang.String name,
Attribute value,
java.lang.Object... requestItems)
Executes the operation. |
void |
start(ArrayStack<java.lang.Object> composeStack,
TilesContainer container,
boolean ignore,
java.lang.String preparer,
java.lang.String role,
java.lang.Object defaultValue,
java.lang.String defaultValueRole,
java.lang.String defaultValueType,
java.lang.String name,
Attribute value,
java.lang.Object... requestItems)
Starts the operation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InsertAttributeModel(AttributeResolver attributeResolver)
attributeResolver
- The attribute resolver to use.Method Detail |
---|
public void start(ArrayStack<java.lang.Object> composeStack, TilesContainer container, boolean ignore, java.lang.String preparer, java.lang.String role, java.lang.Object defaultValue, java.lang.String defaultValueRole, java.lang.String defaultValueType, java.lang.String name, Attribute value, java.lang.Object... requestItems)
composeStack
- The compose stack,container
- The Tiles container to use.ignore
- If true
, if an exception happens during
rendering, of if the attribute is null, the problem will be ignored.preparer
- The preparer to invoke before rendering the attribute.role
- A comma-separated list of roles. If present, the attribute
will be rendered only if the current user belongs to one of the roles.defaultValue
- The default value of the attribute. To use only if
the attribute was not computed.defaultValueRole
- The default comma-separated list of roles. To use
only if the attribute was not computed.defaultValueType
- The default type of the attribute. To use only if
the attribute was not computed.name
- The name of the attribute.value
- The attribute to use immediately, if not null.requestItems
- The request objects.public void end(ArrayStack<java.lang.Object> composeStack, TilesContainer container, boolean ignore, java.lang.Object... requestItems) throws java.io.IOException
composeStack
- The compose stack,container
- The Tiles container to use.ignore
- If true
, if an exception happens during
rendering, of if the attribute is null, the problem will be ignored.requestItems
- The request objects.
java.io.IOException
- If an I/O error happens during rendering.public void execute(TilesContainer container, boolean ignore, java.lang.String preparer, java.lang.String role, java.lang.Object defaultValue, java.lang.String defaultValueRole, java.lang.String defaultValueType, java.lang.String name, Attribute value, java.lang.Object... requestItems) throws java.io.IOException
container
- The Tiles container to use.ignore
- If true
, if an exception happens during
rendering, of if the attribute is null, the problem will be ignored.preparer
- The preparer to invoke before rendering the attribute.role
- A comma-separated list of roles. If present, the attribute
will be rendered only if the current user belongs to one of the roles.defaultValue
- The default value of the attribute. To use only if
the attribute was not computed.defaultValueRole
- The default comma-separated list of roles. To use
only if the attribute was not computed.defaultValueType
- The default type of the attribute. To use only if
the attribute was not computed.name
- The name of the attribute.value
- The attribute to use immediately, if not null.requestItems
- The request objects.
java.io.IOException
- If an I/O error happens during rendering.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |