public class

TransformTag

extends HtmlEscapingAwareTag
java.lang.Object
   ↳ TagSupport
     ↳ org.springframework.web.servlet.tags.RequestContextAwareTag
       ↳ org.springframework.web.servlet.tags.HtmlEscapingAwareTag
         ↳ org.springframework.web.servlet.tags.TransformTag

Class Overview

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.

See Also

Summary

[Expand]
Inherited Constants
From class org.springframework.web.servlet.tags.RequestContextAwareTag
[Expand]
Inherited Fields
From class org.springframework.web.servlet.tags.RequestContextAwareTag
Public Constructors
TransformTag()
Public Methods
void setScope(String scope)
Set the scope to export the variable to.
void setValue(Object value)
Set the value to transform, using the appropriate PropertyEditor from the enclosing BindTag.
void setVar(String var)
Set PageContext attribute name under which to expose a variable that contains the result of the transformation.
Protected Methods
final int doStartTagInternal()
Called by doStartTag to perform the actual work.
[Expand]
Inherited Methods
From class org.springframework.web.servlet.tags.HtmlEscapingAwareTag
From class org.springframework.web.servlet.tags.RequestContextAwareTag
From class java.lang.Object

Public Constructors

public TransformTag ()

Public Methods

public void setScope (String scope)

Set the scope to export the variable to. Default is SCOPE_PAGE ("page").

See Also

public void setValue (Object value)

Set the value to transform, using the appropriate PropertyEditor from the enclosing BindTag.

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 (String var)

Set PageContext attribute name under which to expose a variable that contains the result of the transformation.

See Also

Protected Methods

protected final int doStartTagInternal ()

Called by doStartTag to perform the actual work.

Returns
  • same as TagSupport.doStartTag
Throws
JspException