|
||||||||||
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.RenderTag org.apache.tiles.jsp.taglib.InsertAttributeTag
public class InsertAttributeTag
This is the tag handler for <tiles:attribute>, which defines an attribute. If the attribute value is a template or a definition, its attributes and its template can be overridden.
Field Summary | |
---|---|
protected Attribute |
attribute
The evaluated attribute. |
protected Object |
defaultValue
This value is evaluated only if value is null and the
attribute with the associated name is null. |
protected String |
defaultValueRole
The role to check for the default value. |
protected String |
defaultValueType
The type of the defaultValue , if it is a string. |
protected String |
name
Name to insert. |
protected Object |
value
The value of the attribute. |
Fields inherited from class org.apache.tiles.jsp.taglib.RenderTag |
---|
attributeContext, container, flush, ignore, preparer, role |
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 | |
---|---|
InsertAttributeTag()
|
Method Summary | |
---|---|
int |
doStartTag()
|
Object |
getDefaultValue()
Returns the default value, that is evaluated only if value
is null and the attribute with the associated name is null. |
String |
getDefaultValueRole()
Returns the role to check for the default value. |
String |
getDefaultValueType()
Returns the default value type. |
String |
getName()
Returns the name of the attribute. |
Object |
getValue()
Get the value. |
protected void |
render()
Render the specified content. |
protected void |
render(Attribute attr)
Renders an attribute for real. |
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 |
setDefaultValue(Object defaultValue)
Sets the default value, that is evaluated only if value is
null and the attribute with the associated name is null. |
void |
setDefaultValueRole(String defaultValueRole)
Sets the role to check for the default value. |
void |
setDefaultValueType(String defaultValueType)
Sets the default value type. |
void |
setName(String value)
Sets the name of the attribute. |
void |
setValue(Object value)
Set the value. |
protected void |
startContext(PageContext context)
Starts the context when entering the tag. |
Methods inherited from class org.apache.tiles.jsp.taglib.RenderTag |
---|
doEndTag, endContext, getPreparer, getRole, isFlush, isIgnore, processNestedTag, processNestedTag, setFlush, setIgnore, setPreparer, setRole |
Methods inherited from class org.apache.tiles.jsp.taglib.TilesBodyTag |
---|
doCatch, doFinally, release |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
doAfterBody, 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 |
Field Detail |
---|
protected String name
protected Object value
protected Object defaultValue
value
is null and the
attribute with the associated name
is null.
protected String defaultValueType
defaultValue
, if it is a string.
protected String defaultValueRole
protected Attribute attribute
Constructor Detail |
---|
public InsertAttributeTag()
Method Detail |
---|
public void setName(String value)
value
- The name of the attribute.public String getName()
public Object getValue()
public void setValue(Object value)
value
- The new valuepublic Object getDefaultValue()
value
is null and the attribute with the associated name
is null.
public void setDefaultValue(Object defaultValue)
value
is
null and the attribute with the associated name
is null.
defaultValue
- The default value to set.public String getDefaultValueType()
getDefaultValue()
is a string.
public void setDefaultValueType(String defaultValueType)
setDefaultValue(Object)
when passing a string.
defaultValueType
- The default value type.public String getDefaultValueRole()
public void setDefaultValueRole(String defaultValueRole)
defaultValueRole
- The default value role.protected void reset()
Tag.doEndTag()
and
Tag.doStartTag()
.
reset
in class RenderTag
public int doStartTag() throws TilesJspException
doStartTag
in interface Tag
doStartTag
in class RenderTag
TilesJspException
protected void render() throws TilesJspException, IOException
render
in class RenderTag
TilesJspException
- if a jsp exception occurs.
IOException
- if an io exception occurs.protected void startContext(PageContext context)
startContext
in class RenderTag
context
- The page context to use.protected void render(Attribute attr) throws IOException
attr
- The attribute to render.
IOException
- If something goes wrong during the reading of
definition files.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |