|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport javax.servlet.jsp.tagext.BodyTagSupport org.apache.tiles.jsp.taglib.TilesBodyTag org.apache.tiles.jsp.taglib.AddAttributeTag
public class AddAttributeTag
Adds an attribute in enclosing attribute container tag.
Enclosing attribute container tag can be :
AddAttributeTagParent
interface.
Exception is thrown if no appropriate tag can be found.
Put tag can have following atributes :
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.
Field Summary | |
---|---|
protected String |
role
The role to check. |
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 |
Constructor Summary | |
---|---|
AddAttributeTag()
|
Method Summary | |
---|---|
int |
doAfterBody()
Save the body content of this tag (if any). |
int |
doEndTag()
|
protected void |
execute()
Executes the processing of this tag, calling its parent tag. |
String |
getRole()
Returns the role to check. |
String |
getType()
Returns content type: string, template or definition. |
Object |
getValue()
Returns the attribute value. |
protected boolean |
isAccessAllowed()
Checks if the user is inside the specified role. |
void |
processNestedDefinitionName(String definitionName)
Process the nested <tiles:definition> tag. |
protected void |
reset()
Release any per-invocation resources, resetting any resources or state that should be cleared between successive invocations of Tag.doEndTag() and
Tag.doStartTag() . |
void |
setRole(String role)
Sets the role to check. |
void |
setType(String type)
Sets content type: string, template or definition. |
void |
setValue(Object value)
Sets the attribute value. |
Methods inherited from class org.apache.tiles.jsp.taglib.TilesBodyTag |
---|
doCatch, doFinally, release |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
doInitBody, doStartTag, 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 |
Field Detail |
---|
protected String role
Constructor Detail |
---|
public AddAttributeTag()
Method Detail |
---|
public String getRole()
public void setRole(String role)
role
- The role to check.public Object getValue()
public void setValue(Object value)
value
- Attribute value. Can be a String or Object.public String getType()
Returns content type: string, template or definition.
<insert attribute="attributeName">
tag, where
'attributeName' is the name used for this tag.
public void setType(String type)
Sets content type: string, template or definition.
<insert attribute="attributeName">
tag, where
'attributeName' is the name used for this tag.
type
- The attribute type.protected void reset()
Tag.doEndTag()
and
Tag.doStartTag()
.
reset
in class TilesBodyTag
public int doAfterBody()
doAfterBody
in interface IterationTag
doAfterBody
in class BodyTagSupport
SKIP_BODY
.public int doEndTag() throws TilesJspException
doEndTag
in interface Tag
doEndTag
in class BodyTagSupport
TilesJspException
public void processNestedDefinitionName(String definitionName)
processNestedDefinitionName
in interface DefinitionTagParent
definitionName
- Nested definition name.protected void execute() throws TilesJspException
TilesJspException
- If something goes wrong during execution.protected boolean isAccessAllowed()
true
if the user is allowed to have the tag
rendered.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |