Package org.apache.tiles.web.jsp.taglib
Class PutAttributeTag
java.lang.Object
jakarta.servlet.jsp.tagext.SimpleTagSupport
org.apache.tiles.web.jsp.taglib.PutAttributeTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.JspTag
,jakarta.servlet.jsp.tagext.SimpleTag
public class PutAttributeTag
extends jakarta.servlet.jsp.tagext.SimpleTagSupport
Put an attribute in enclosing attribute container tag.
Enclosing attribute container tag can be :
- <initContainer>
- <definition>
- <insertAttribute>
- <insertDefinition>
- <putListAttribute>
Put tag can have following atributes :
- name : Name of the attribute
- value : value to put as attribute
- type : value type. 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), object (value is used as it is)
- role : Role to check when 'insertAttribute' will be called.
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
doTag()
Getter for expression property.getName()
Getter for name property.getRole()
Getter for role property.getType()
Getter for type property.getValue()
Getter for value property.boolean
Getter for cascade property.void
setCascade
(boolean cascade) Setter for cascade property.void
setExpression
(String expression) Setter for expression property.void
Setter for name property.void
Setter for role property.void
Setter for type property.void
Setter for value property.Methods inherited from class jakarta.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
-
Constructor Details
-
PutAttributeTag
public PutAttributeTag()
-
-
Method Details
-
getName
Getter for name property.- Returns:
- The name of the attribute to put.
-
setName
Setter for name property.- Parameters:
name
- The name of the attribute to put.
-
getValue
Getter for value property.- Returns:
- The value of the attribute. Use this parameter, or expression, or body.
-
setValue
Setter for value property.- Parameters:
value
- The value of the attribute. Use this parameter, or expression, or body.
-
getExpression
Getter for expression property.- Returns:
- The expression to calculate the value from. Use this parameter, or value, or body.
-
setExpression
Setter for expression property.- Parameters:
expression
- The expression to calculate the value from. Use this parameter, or value, or body.
-
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
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.
-
getType
Getter for type property.- Returns:
- The type (renderer) of the attribute.
-
setType
Setter for type property.- Parameters:
type
- The type (renderer) of the attribute.
-
isCascade
public boolean isCascade()Getter for cascade property.- Returns:
- If true the attribute will be cascaded to all nested attributes.
-
setCascade
public void setCascade(boolean cascade) Setter for cascade property.- Parameters:
cascade
- If true the attribute will be cascaded to all nested attributes.
-
doTag
- Specified by:
doTag
in interfacejakarta.servlet.jsp.tagext.SimpleTag
- Overrides:
doTag
in classjakarta.servlet.jsp.tagext.SimpleTagSupport
- Throws:
jakarta.servlet.jsp.JspException
IOException
-