D.9. The transform tag

Provides transformation of variables to Strings, using an appropriate custom PropertyEditor from BindTag (can only be used inside BindTag). The HTML escaping flag participates in a page-wide or application-wide setting (i.e. by HtmlEscapeTag or a 'defaultHtmlEscape' context-param in web.xml).

表 D.8. Attributes

Attribute Required? Runtime Expression? Description

htmlEscape

false

true

Set HTML escaping for this tag, as boolean value. Overrides the default HTML escaping setting for the current page.

scope

false

true

The scope to use when exported the result to a variable. This attribute is only used when var is also set. Possible values are page, request, session and application.

value

true

true

The value to transform. This is the actual object you want to have transformed (for instance a Date). Using the PropertyEditor that is currently in use by the 'spring:bind' tag.

var

false

true

The string to use when binding the result to the page, request, session or application scope. If not specified, the result gets outputted to the writer (i.e. typically directly to the JSP).