|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.jelly.TagSupport
TagSupport
an abstract base class which is useful to
inherit from if developing your own tag.
Field Summary | |
protected Script |
body
the body of the tag |
protected JellyContext |
context
|
protected boolean |
hasTrimmed
|
protected Tag |
parent
the parent of this tag |
protected java.lang.Boolean |
shouldTrim
The current context |
Constructor Summary | |
TagSupport()
|
|
TagSupport(boolean shouldTrim)
|
Method Summary | |
protected Tag |
findAncestorWithClass(java.lang.Class parentClass)
Searches up the parent hierarchy for a Tag of the given type |
static Tag |
findAncestorWithClass(Tag from,
java.lang.Class tagClass)
Searches up the parent hierarchy from the given tag for a Tag of the given type |
Script |
getBody()
|
protected java.lang.String |
getBodyText()
Evaluates the given body using a buffer and returns the String of the result. |
protected java.lang.String |
getBodyText(boolean shouldEscape)
Evaluates the given body using a buffer and returns the String of the result. |
JellyContext |
getContext()
Gets the context in which the tag will be run |
Tag |
getParent()
|
void |
invokeBody(XMLOutput output)
Invokes the body of this tag using the given output |
boolean |
isTrim()
|
void |
setBody(Script body)
Sets the body of the tag |
void |
setContext(JellyContext context)
Sets the context in which the tag will be run |
void |
setParent(Tag parent)
Sets the parent of this tag |
void |
setTrim(boolean shouldTrim)
Sets whether whitespace inside this tag should be trimmed or not. |
protected void |
trimBody()
Find all text nodes inside the top level of this body and if they are just whitespace then remove them |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.commons.jelly.Tag |
doTag |
Field Detail |
protected Tag parent
protected Script body
protected java.lang.Boolean shouldTrim
protected boolean hasTrimmed
protected JellyContext context
Constructor Detail |
public TagSupport()
public TagSupport(boolean shouldTrim)
Method Detail |
public static Tag findAncestorWithClass(Tag from, java.lang.Class tagClass)
from
- the tag to start searching fromtagClass
- the type of the tag to findpublic void setTrim(boolean shouldTrim)
public boolean isTrim()
public Tag getParent()
getParent
in interface Tag
public void setParent(Tag parent)
setParent
in interface Tag
public Script getBody()
getBody
in interface Tag
public void setBody(Script body)
setBody
in interface Tag
public JellyContext getContext()
Tag
getContext
in interface Tag
public void setContext(JellyContext context) throws java.lang.Exception
setContext
in interface Tag
public void invokeBody(XMLOutput output) throws java.lang.Exception
invokeBody
in interface Tag
protected Tag findAncestorWithClass(java.lang.Class parentClass)
protected java.lang.String getBodyText() throws java.lang.Exception
protected java.lang.String getBodyText(boolean shouldEscape) throws java.lang.Exception
shouldEscape
- Signal if the text should be escaped.protected void trimBody()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |