|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTagSupport
org.springframework.web.servlet.tags.RequestContextAwareTag
org.springframework.web.servlet.tags.HtmlEscapingAwareTag
org.springframework.web.servlet.tags.TransformTag
public class TransformTag
Tag for transforming reference data values from form controllers and
other objects inside a spring:bind
tag (or a data-bound
form element tag from Spring's form tag library).
The BindTag has a PropertyEditor that it uses to transform properties of a bean to a String, useable in HTML forms. This tag uses that PropertyEditor to transform objects passed into this tag.
BindTag
Field Summary | |
---|---|
private java.lang.String |
scope
the scope of the variable the result will be put in |
private java.lang.Object |
value
the value to transform using the appropriate property editor |
private java.lang.String |
var
the variable to put the result in |
Fields inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag |
---|
logger, REQUEST_CONTEXT_PAGE_ATTRIBUTE |
Constructor Summary | |
---|---|
TransformTag()
|
Method Summary | |
---|---|
protected int |
doStartTagInternal()
Called by doStartTag to perform the actual work. |
void |
setScope(java.lang.String scope)
Set the scope to export the variable to. |
void |
setValue(java.lang.Object value)
Set the value to transform, using the appropriate PropertyEditor from the enclosing BindTag. |
void |
setVar(java.lang.String var)
Set PageContext attribute name under which to expose a variable that contains the result of the transformation. |
Methods inherited from class org.springframework.web.servlet.tags.HtmlEscapingAwareTag |
---|
isDefaultHtmlEscape, isHtmlEscape, setHtmlEscape |
Methods inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag |
---|
doCatch, doFinally, doStartTag, getRequestContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.Object value
private java.lang.String var
private java.lang.String scope
Constructor Detail |
---|
public TransformTag()
Method Detail |
---|
public void setValue(java.lang.Object value)
The value can either be a plain value to transform (a hard-coded String value in a JSP or a JSP expression), or a JSP EL expression to be evaluated (transforming the result of the expression).
Like all of Spring's JSP tags, this tag is capable of parsing EL expressions itself, on any JSP version. Note, however, that EL expressions in a JSP 2.0 page will be evaluated by the JSP container, with the result getting passed in here. For this reason, the type of this property is Object (accepting any result object from a pre-evaluated expression) rather than String.
public void setVar(java.lang.String var)
setScope(java.lang.String)
,
javax.servlet.jsp.PageContext#setAttribute
public void setScope(java.lang.String scope)
setVar(java.lang.String)
,
TagUtils.SCOPE_PAGE
,
javax.servlet.jsp.PageContext#setAttribute
protected final int doStartTagInternal() throws JspException
RequestContextAwareTag
doStartTagInternal
in class RequestContextAwareTag
JspException
javax.servlet.jsp.tagext.TagSupport#doStartTag
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |