Package org.apache.tiles.jsp.taglib
Class InsertAttributeTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.SimpleTagSupport
-
- org.apache.tiles.jsp.taglib.InsertAttributeTag
-
- All Implemented Interfaces:
javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.SimpleTag
public class InsertAttributeTag extends javax.servlet.jsp.tagext.SimpleTagSupport
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
Constructors Constructor Description InsertAttributeTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doTag()
java.lang.Object
getDefaultValue()
Getter for defaultValue property.java.lang.String
getDefaultValueRole()
Getter for defaultValueRole property.java.lang.String
getDefaultValueType()
Getter for defaultValueType property.java.lang.String
getName()
Getter for name property.java.lang.String
getPreparer()
Getter for preparer property.java.lang.String
getRole()
Getter for role property.Attribute
getValue()
Getter for value property.boolean
isFlush()
Getter for flush property.boolean
isIgnore()
Getter for ignore property.void
setDefaultValue(java.lang.Object defaultValue)
Setter for defaultValue property.void
setDefaultValueRole(java.lang.String defaultValueRole)
Setter for defaultValueRole property.void
setDefaultValueType(java.lang.String defaultValueType)
Setter for defaultValueType property.void
setFlush(boolean flush)
Setter for flush property.void
setIgnore(boolean ignore)
Setter for ignore property.void
setName(java.lang.String name)
Setter for name property.void
setPreparer(java.lang.String preparer)
Setter for preparer property.void
setRole(java.lang.String role)
Setter for role property.void
setValue(Attribute value)
Setter for value property.
-
-
-
Method Detail
-
isIgnore
public boolean isIgnore()
Getter for ignore property.- Returns:
- If
true
, if an exception happens during rendering, of if the attribute is null, the problem will be ignored.
-
setIgnore
public void setIgnore(boolean ignore)
Setter for ignore property.- Parameters:
ignore
- Iftrue
, if an exception happens during rendering, of if the attribute is null, the problem will be ignored.
-
getPreparer
public java.lang.String getPreparer()
Getter for preparer property.- Returns:
- The preparer to invoke before rendering the attribute.
-
setPreparer
public void setPreparer(java.lang.String preparer)
Setter for preparer property.- Parameters:
preparer
- The preparer to invoke before rendering the attribute.
-
getRole
public java.lang.String getRole()
Getter for role property.- Returns:
- A comma-separated list of roles. If present, the attribute will be rendered only if the current user belongs to one of the roles.
-
setRole
public void setRole(java.lang.String role)
Setter for role property.- Parameters:
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.
-
getDefaultValue
public java.lang.Object getDefaultValue()
Getter for defaultValue property.- Returns:
- The default value of the attribute. To use only if the attribute was not computed.
-
setDefaultValue
public void setDefaultValue(java.lang.Object defaultValue)
Setter for defaultValue property.- Parameters:
defaultValue
- The default value of the attribute. To use only if the attribute was not computed.
-
getDefaultValueRole
public java.lang.String getDefaultValueRole()
Getter for defaultValueRole property.- Returns:
- The default comma-separated list of roles. To use only if the attribute was not computed.
-
setDefaultValueRole
public void setDefaultValueRole(java.lang.String defaultValueRole)
Setter for defaultValueRole property.- Parameters:
defaultValueRole
- The default comma-separated list of roles. To use only if the attribute was not computed.
-
getDefaultValueType
public java.lang.String getDefaultValueType()
Getter for defaultValueType property.- Returns:
- The default type of the attribute. To use only if the attribute was not computed.
-
setDefaultValueType
public void setDefaultValueType(java.lang.String defaultValueType)
Setter for defaultValueType property.- Parameters:
defaultValueType
- The default type of the attribute. To use only if the attribute was not computed.
-
getName
public java.lang.String getName()
Getter for name property.- Returns:
- The name of the attribute.
-
setName
public void setName(java.lang.String name)
Setter for name property.- Parameters:
name
- The name of the attribute.
-
getValue
public Attribute getValue()
Getter for value property.- Returns:
- The attribute to use immediately, if not null.
-
setValue
public void setValue(Attribute value)
Setter for value property.- Parameters:
value
- The attribute to use immediately, if not null.
-
isFlush
public boolean isFlush()
Getter for flush property.- Returns:
- If
true
, the response will be flushed after the insert.
-
setFlush
public void setFlush(boolean flush)
Setter for flush property.- Parameters:
flush
- Iftrue
, the response will be flushed after the insert.
-
doTag
public void doTag() throws javax.servlet.jsp.JspException, java.io.IOException
- Specified by:
doTag
in interfacejavax.servlet.jsp.tagext.SimpleTag
- Overrides:
doTag
in classjavax.servlet.jsp.tagext.SimpleTagSupport
- Throws:
javax.servlet.jsp.JspException
java.io.IOException
-
-