org.springframework.web.servlet.tags
Class TransformTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byorg.springframework.web.servlet.tags.RequestContextAwareTag
          extended byorg.springframework.web.servlet.tags.HtmlEscapingAwareTag
              extended byorg.springframework.web.servlet.tags.TransformTag
All Implemented Interfaces:
IterationTag, Serializable, Tag, TryCatchFinally

public class TransformTag
extends HtmlEscapingAwareTag

Tag for transforming reference data values from form controllers and other objects inside a spring:bind tag.

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.

Since:
20.09.2003
Author:
Alef Arendsen
See Also:
BindTag, Serialized Form

Field Summary
 
Fields inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag
logger, REQUEST_CONTEXT_PAGE_ATTRIBUTE
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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
TransformTag()
           
 
Method Summary
protected  int doStartTagInternal()
          Called by doStartTag to perform the actual work.
 void setScope(String scope)
          Set the scope to export the variable to.
 void setValue(String value)
          Set the value to finally transform using the appropriate PropertyEditor from the BindTag.
 void setVar(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
isHtmlEscape, setHtmlEscape
 
Methods inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag
doCatch, doFinally, doStartTag, getRequestContext
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformTag

public TransformTag()
Method Detail

setValue

public void setValue(String value)
Set the value to finally transform using the appropriate PropertyEditor from the BindTag.


setVar

public void setVar(String var)
Set PageContext attribute name under which to expose a variable that contains the result of the transformation.

See Also:
setScope(java.lang.String), PageContext.setAttribute(java.lang.String, java.lang.Object)

setScope

public void setScope(String scope)
Set the scope to export the variable to. Default is SCOPE_PAGE ("page").

See Also:
setVar(java.lang.String), TagUtils.SCOPE_PAGE, PageContext.setAttribute(java.lang.String, java.lang.Object)

doStartTagInternal

protected final int doStartTagInternal()
                                throws JspException
Description copied from class: RequestContextAwareTag
Called by doStartTag to perform the actual work.

Specified by:
doStartTagInternal in class RequestContextAwareTag
Returns:
same as TagSupport.doStartTag
Throws:
JspException
See Also:
TagSupport.doStartTag()


Copyright (C) 2003-2004 The Spring Framework Project.