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.TransformTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class TransformTag
extends RequestContextAwareTag

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

The bind tag has a PropertyEditor that it used to transform the property of 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:
Serialized Form

Field Summary
 
Fields inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag
logger
 
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
 int doStartTagInternal()
          Called by doStartTag to perform the actual work.
 void release()
          Releasing of resources.
 void setScope(java.lang.String scope)
          Set the scope to which to export the variable indicated.
 void setValue(java.lang.String value)
          Set the value to finally transform using the appropriate property editor that has to be found in the BindTag.
 void setVar(java.lang.String var)
          Set the name of the variable to which to export the result of the transformation.
 
Methods inherited from class org.springframework.web.servlet.tags.RequestContextAwareTag
doStartTag, getRequestContext, isHtmlEscape, setHtmlEscape
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, 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
 

Constructor Detail

TransformTag

public TransformTag()
Method Detail

setValue

public void setValue(java.lang.String value)
              throws javax.servlet.jsp.JspException
Set the value to finally transform using the appropriate property editor that has to be found in the BindTag.

Parameters:
value - the value
Throws:
javax.servlet.jsp.JspException - if expression evaluation fails

setVar

public void setVar(java.lang.String var)
Set the name of the variable to which to export the result of the transformation.

Parameters:
var - the name of the variable

setScope

public void setScope(java.lang.String scope)
              throws javax.servlet.jsp.JspException
Set the scope to which to export the variable indicated. If the scope isn't one of the allowed scope, it'll be the default (SCOPE_PAGE).

Parameters:
scope - the scope (SCOPE_PAGE, SCOPE_REQUEST, SCOPE_APPLICATION or SCOPE_SESSION)
Throws:
javax.servlet.jsp.JspException

doStartTagInternal

public int doStartTagInternal()
                       throws javax.servlet.jsp.JspException
Description copied from class: RequestContextAwareTag
Called by doStartTag to perform the actual work.

Overrides:
doStartTagInternal in class RequestContextAwareTag
Returns:
same as TagSupport.doStartTag
Throws:
javax.servlet.jsp.JspException
See Also:
TagSupport.doStartTag()

release

public void release()
Releasing of resources.



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