org.apache.tiles.taglib
Class AddAttributeTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.apache.tiles.taglib.ContainerTagSupport
org.apache.tiles.taglib.AddAttributeTag
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, ComponentConstants
- Direct Known Subclasses:
- AddListAttributeTag
public class AddAttributeTag
- extends ContainerTagSupport
- implements ComponentConstants
Adds an attribute in enclosing attribute container tag.
Enclosing attribute container tag can be :
- <putListAttribute>
- <putAttribute>
(or any other tag which implements the AddAttributeTagParent
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)
- 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.
- See Also:
- Serialized Form
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Method Summary |
int |
doAfterBody()
Save the body content of this tag (if any) |
protected void |
endContext(javax.servlet.jsp.PageContext context)
|
protected void |
execute()
|
java.lang.String |
getType()
|
java.lang.Object |
getValue()
|
void |
release()
Release all allocated resources. |
void |
setType(java.lang.String type)
|
void |
setValue(java.lang.Object value)
|
protected void |
startContext(javax.servlet.jsp.PageContext context)
|
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doInitBody, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
getParent, setPageContext, setParent |
AddAttributeTag
public AddAttributeTag()
getValue
public java.lang.Object getValue()
setValue
public void setValue(java.lang.Object value)
getType
public java.lang.String getType()
setType
public void setType(java.lang.String type)
release
public void release()
- Release all allocated resources.
- Specified by:
release
in interface javax.servlet.jsp.tagext.Tag
- Overrides:
release
in class ContainerTagSupport
doAfterBody
public int doAfterBody()
throws javax.servlet.jsp.JspException
- Save the body content of this tag (if any)
- Specified by:
doAfterBody
in interface javax.servlet.jsp.tagext.IterationTag
- Overrides:
doAfterBody
in class javax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
- if a JSP exception has occurred
startContext
protected void startContext(javax.servlet.jsp.PageContext context)
- Overrides:
startContext
in class ContainerTagSupport
endContext
protected void endContext(javax.servlet.jsp.PageContext context)
- Overrides:
endContext
in class ContainerTagSupport
execute
protected void execute()
throws javax.servlet.jsp.JspException
- Specified by:
execute
in class ContainerTagSupport
- Throws:
javax.servlet.jsp.JspException