|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.jelly.TagSupport
org.apache.commons.jelly.tags.core.SetTag
public class SetTag
A tag which sets a variable from the result of an expression
Field Summary | |
---|---|
private Expression |
defaultValue
The default value |
private boolean |
encode
Should we XML encode the body of this tag as text? |
private static org.apache.commons.logging.Log |
log
The Log to which logging calls will be made. |
private java.lang.String |
property
The name of the property to set on the target object. |
private java.lang.String |
scope
The variable scope to export |
private java.lang.Object |
target
The target object on which to set a property. |
private Expression |
value
The expression to evaluate. |
private java.lang.String |
var
The variable name to export. |
Fields inherited from class org.apache.commons.jelly.TagSupport |
---|
body, context, hasTrimmed, parent, shouldTrim |
Constructor Summary | |
---|---|
SetTag()
|
Method Summary | |
---|---|
void |
doTag(XMLOutput output)
Evaluates this tag after all the tags properties have been initialized. |
protected boolean |
isEmpty(java.lang.Object value)
|
boolean |
isEncode()
Returns whether the body of this tag will be XML encoded or not. |
void |
setDefaultValue(Expression defaultValue)
Sets the default value to be used if the value exprsesion results in a null value or blank String |
void |
setEncode(boolean encode)
Sets whether the body of the tag should be XML encoded as text (so that < and > are encoded as < and >) or leave the text as XML which is the default. |
void |
setProperty(java.lang.String property)
Sets the name of the property to set on the target object. |
protected void |
setPropertyValue(java.lang.Object target,
java.lang.String property,
java.lang.Object value)
|
void |
setScope(java.lang.String scope)
Sets the variable scope for this variable. |
void |
setTarget(java.lang.Object target)
Sets the target object on which to set a property. |
void |
setValue(Expression value)
Sets the expression to evaluate. |
void |
setVar(java.lang.String var)
Sets the variable name to define for this expression |
Methods inherited from class org.apache.commons.jelly.TagSupport |
---|
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log log
private java.lang.String var
private java.lang.String scope
private Expression value
private Expression defaultValue
private java.lang.Object target
private java.lang.String property
private boolean encode
Constructor Detail |
---|
public SetTag()
Method Detail |
---|
public void doTag(XMLOutput output) throws JellyTagException
Tag
JellyTagException
public void setVar(java.lang.String var)
public void setScope(java.lang.String scope)
public void setValue(Expression value)
public void setDefaultValue(Expression defaultValue)
public void setTarget(java.lang.Object target)
public void setProperty(java.lang.String property)
public boolean isEncode()
public void setEncode(boolean encode)
protected void setPropertyValue(java.lang.Object target, java.lang.String property, java.lang.Object value)
protected boolean isEmpty(java.lang.Object value)
value
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |