提交 eea8ee21 编写于 作者: R Rossen Stoyanchev

Migrate JSP tag library appendix reference to Javadoc.

The Javadoc on tag classes now has all the information including a
list of all tags at the package level, HTML tables listing tag
attributes in each tag class, and class level description that is
as good or in many cases better than what was in the reference.

Issue: SPR-16045
上级 e5a5677f
......@@ -22,11 +22,31 @@ import javax.servlet.jsp.tagext.BodyTagSupport;
import org.springframework.lang.Nullable;
/**
* JSP tag for collecting arguments and passing them to an {@link ArgumentAware}
* ancestor in the tag hierarchy.
* The {@code <argument>} tag is based on the JSTL {@code fmt:param} tag.
* The purpose is to support arguments inside the message and theme tags.
*
* <p>This tag must be nested under an argument aware tag.
*
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td>value</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>The value of the argument.</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Nicholas Williams
* @since 4.0
* @see MessageTag
......
......@@ -24,9 +24,39 @@ import org.springframework.lang.Nullable;
import org.springframework.validation.Errors;
/**
* JSP tag that evaluates content if there are binding errors
* for a certain bean. Exports an "errors" variable of type
* {@link org.springframework.validation.Errors} for the given bean.
* This {@code <hasBindErrors>} tag provides an {@link Errors} instance in case of
* bind errors. 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).
*
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td>htmlEscape</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Set HTML escaping for this tag, as boolean value.
* Overrides the default HTML escaping setting for the current page.</p></td>
* </tr>
* <tr class="rowColor">
* <td>name</p></td>
* <td>true</p></td>
* <td>true</p></td>
* <td>The name of the bean in the request that needs to be inspected for errors.
* If errors are available for this bean, they will be bound under the
* 'errors' key.</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Rod Johnson
* @author Juergen Hoeller
......
......@@ -26,7 +26,7 @@ import org.springframework.validation.Errors;
import org.springframework.web.servlet.support.BindStatus;
/**
* Bind tag, supporting evaluation of binding errors for a certain
* The {@code <bind>} tag supports evaluation of binding errors for a certain
* bean or bean property. Exposes a "status" variable of type
* {@link org.springframework.web.servlet.support.BindStatus},
* to both Java expressions and JSP EL expressions.
......@@ -42,6 +42,43 @@ import org.springframework.web.servlet.support.BindStatus;
* as the bean property that this errors object applies to. Nested tags
* such as the {@link TransformTag} can access those exposed properties.
*
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td><p>htmlEscape</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Set HTML escaping for this tag, as boolean value. Overrides the default
* HTML escaping setting for the current page.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>ignoreNestedPath</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Set whether to ignore a nested path, if any.
* Default is to not ignore.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>path</p></td>
* <td><p>true</p></td>
* <td><p>true</p></td>
* <td><p>The path to the bean or bean property to bind status information for.
* For instance account.name, company.address.zipCode or just employee. The status
* object will exported to the page scope, specifically for this bean or bean
* property</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Rod Johnson
* @author Juergen Hoeller
* @see #setPath
......
......@@ -26,7 +26,7 @@ import org.springframework.util.Assert;
import org.springframework.web.util.JavaScriptUtils;
/**
* Custom JSP tag to escape its enclosed body content,
* The {@code <escapeBody>} tag is used to escape its enclosed body content,
* applying HTML escaping and/or JavaScript escaping.
*
* <p>Provides a "htmlEscape" property for explicitly specifying whether to
......@@ -37,6 +37,33 @@ import org.springframework.web.util.JavaScriptUtils;
* <p>Provides a "javaScriptEscape" property for specifying whether to apply
* JavaScript escaping. Can be combined with HTML escaping or used standalone.
*
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* <tbody>
* <tr class="altColor">
* <td>htmlEscape</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Set HTML escaping for this tag, as boolean value.
* Overrides the default HTML escaping setting for the current page.</p></td>
* </tr>
* <tr class="rowColor">
* <td>javaScriptEscape</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Set JavaScript escaping for this tag, as boolean value.
* Default is false.</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Juergen Hoeller
* @since 1.1.1
* @see org.springframework.web.util.HtmlUtils
......
......@@ -39,9 +39,59 @@ import org.springframework.web.util.JavaScriptUtils;
import org.springframework.web.util.TagUtils;
/**
* JSP tag for evaluating expressions with the Spring Expression Language (SpEL).
* Supports the standard JSP evaluation context consisting of implicit variables and scoped attributes.
* The {@code <eval>} tag evaluates a Spring expression (SpEL) and either prints
* the result or assigns it to a variable. Supports the standard JSP evaluation
* context consisting of implicit variables and scoped attributes.
*
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* <tbody>
* <tr class="altColor">
* <td>expression</p></td>
* <td>true</p></td>
* <td>true</p></td>
* <td>The expression to evaluate.</p></td>
* </tr>
* <tr class="rowColor">
* <td>htmlEscape</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Set HTML escaping for this tag, as a boolean value.
* Overrides the default HTML escaping setting for the current page.</p></td>
* </tr>
* <tr class="altColor">
* <td>javaScriptEscape</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Set JavaScript escaping for this tag, as a boolean value.
* Default is false.</p></td>
* </tr>
* <tr class="rowColor">
* <td>scope</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>The scope for the var. 'application', 'session', 'request' and 'page'
* scopes are supported. Defaults to page scope. This attribute has no effect
* unless the var attribute is also defined.</p></td>
* </tr>
* <tr class="altColor">
* <td>var</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>The name of the variable to export the evaluation result to.
* If not specified the evaluation result is converted to a String and written
* as output.</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Keith Donald
* @author Juergen Hoeller
* @since 3.0.1
......
......@@ -19,12 +19,34 @@ package org.springframework.web.servlet.tags;
import javax.servlet.jsp.JspException;
/**
* Sets default HTML escape value for the current page. The actual value
* can be overridden by escaping-aware tags. The default is "false".
* The {@code <htmlEscape>} tag sets default HTML escape value for the current
* page. The actual value can be overridden by escaping-aware tags.
* The default is "false".
*
* <p>Note: You can also set a "defaultHtmlEscape" web.xml context-param.
* A page-level setting overrides a context-param.
*
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td>defaultHtmlEscape</p></td>
* <td>true</p></td>
* <td>true</p></td>
* <td>Set the default value for HTML escaping, to be put into the current
* PageContext.</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Juergen Hoeller
* @since 04.03.2003
* @see HtmlEscapingAwareTag#setHtmlEscape
......
......@@ -34,8 +34,9 @@ import org.springframework.web.util.JavaScriptUtils;
import org.springframework.web.util.TagUtils;
/**
* Custom JSP tag to look up a message in the scope of this page. Messages are
* resolved using the ApplicationContext and thus support internationalization.
* The {@code <message>} tag looks up a message in the scope of this page.
* Messages are resolved using the ApplicationContext and thus support
* internationalization.
*
* <p>Detects an HTML escaping setting, either on this tag instance, the page level,
* or the {@code web.xml} level. Can also apply JavaScript escaping.
......@@ -46,6 +47,91 @@ import org.springframework.web.util.TagUtils;
* <p>Message arguments can be specified via the {@link #setArguments(Object) arguments}
* attribute or by using nested {@code <spring:argument>} tags.
*
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td>arguments</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Set optional message arguments for this tag, as a (comma-)delimited
* String (each String argument can contain JSP EL), an Object array (used as
* argument array), or a single Object (used as single argument).</p></td>
* </tr>
* <tr class="rowColor">
* <td>argumentSeparator</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>The separator character to be used for splitting the arguments string
* value; defaults to a 'comma' (',').</p></td>
* </tr>
* <tr class="altColor">
* <td>code</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>The code (key) to use when looking up the message.
* If code is not provided, the text attribute will be used.</p></td>
* </tr>
* <tr class="rowColor">
* <td>htmlEscape</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Set HTML escaping for this tag, as boolean value.
* Overrides the default HTML escaping setting for the current page.</p></td>
* </tr>
* <tr class="altColor">
* <td>javaScriptEscape</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Set JavaScript escaping for this tag, as boolean value.
* Default is false.</p></td>
* </tr>
* <tr class="rowColor">
* <td>message</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>A MessageSourceResolvable argument (direct or through JSP EL).
* Fits nicely when used in conjunction with Spring’s own validation error
* classes which all implement the MessageSourceResolvable interface.
* For example, this allows you to iterate over all of the errors in a form,
* passing each error (using a runtime expression) as the value of this
* 'message' attribute, thus effecting the easy display of such error
* messages.</p></td>
* </tr>
* <tr class="altColor">
* <td>scope</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>The scope to use when exporting the result to a variable. This attribute
* is only used when var is also set. Possible values are page, request, session
* and application.</p></td>
* </tr>
* <tr class="rowColor">
* <td>text</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Default text to output when a message for the given code could not be
* found. If both text and code are not set, the tag will output null.</p></td>
* </tr>
* <tr class="altColor">
* <td>var</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>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).</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Rod Johnson
* @author Juergen Hoeller
* @author Nicholas Williams
......
......@@ -25,9 +25,9 @@ import org.springframework.beans.PropertyAccessor;
import org.springframework.lang.Nullable;
/**
* <p>Nested-path tag, to support and assist with nested beans or bean properties
* in the model. Exports a "nestedPath" variable of type String in request scope,
* visible to the current page and also included pages, if any.
* <p>The {@code <nestedPath>} tag supports and assists with nested beans or
* bean properties in the model. Exports a "nestedPath" variable of type String
* in request scope, visible to the current page and also included pages, if any.
*
* <p>The BindTag will auto-detect the current nested path and automatically
* prepend it to its own path to form a complete path to the bean or bean property.
......@@ -35,7 +35,26 @@ import org.springframework.lang.Nullable;
* <p>This tag will also prepend any existing nested path that is currently set.
* Thus, you can nest multiple nested-path tags.
*
* <p>Thanks to Seth Ladd for the suggestion and the original implementation!
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td>path</p></td>
* <td>true</p></td>
* <td>true</p></td>
* <td>Set the path that this tag should apply. E.g. 'customer' to allow bind
* paths like 'address.street' rather than 'customer.address.street'.</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Juergen Hoeller
* @since 1.1
......
......@@ -22,11 +22,37 @@ import javax.servlet.jsp.tagext.BodyTagSupport;
import org.springframework.lang.Nullable;
/**
* JSP tag for collecting name-value parameters and passing them to a
* The {@code <param>} tag collects name-value parameters and passes them to a
* {@link ParamAware} ancestor in the tag hierarchy.
*
* <p>This tag must be nested under a param aware tag.
*
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td>name</p></td>
* <td>true</p></td>
* <td>true</p></td>
* <td>The name of the parameter.</p></td>
* </tr>
* <tr class="rowColor">
* <td>value</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>The value of the parameter.</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Scott Andrews
* @author Nicholas Williams
* @since 3.0
......
......@@ -20,7 +20,7 @@ import org.springframework.context.MessageSource;
import org.springframework.context.NoSuchMessageException;
/**
* Custom tag to look up a theme message in the scope of this page.
* The {@code <theme>} tag looks up a theme message in the scope of this page.
* Messages are looked up using the ApplicationContext's ThemeSource,
* and thus should support internationalization.
*
......@@ -30,9 +30,88 @@ import org.springframework.context.NoSuchMessageException;
* <p>If "code" isn't set or cannot be resolved, "text" will be used
* as default message.
*
* <p>Message arguments can be specified via the {@link #setArguments(Object) arguments}
* attribute or by using nested {@code <spring:argument>} tags.
* <p>Message arguments can be specified via the {@link #setArguments(Object)
* arguments} attribute or by using nested {@code <spring:argument>} tags.
*
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td>arguments</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Set optional message arguments for this tag, as a (comma-)delimited
* String (each String argument can contain JSP EL), an Object array (used as
* argument array), or a single Object (used as single argument).</p></td>
* </tr>
* <tr class="rowColor">
* <td>argumentSeparator</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>The separator character to be used for splitting the arguments string
* value; defaults to a 'comma' (',').</p></td>
* </tr>
* <tr class="altColor">
* <td>code</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>The code (key) to use when looking up the message. If code is not
* provided, the text attribute will be used.</p></td>
* </tr>
* <tr class="rowColor">
* <td>htmlEscape</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Set HTML escaping for this tag, as boolean value. Overrides the default
* HTML escaping setting for the current page.</p></td>
* </tr>
* <tr class="altColor">
* <td>javaScriptEscape</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Set JavaScript escaping for this tag, as boolean value.
* Default is false.</p></td>
* </tr>
* <tr class="rowColor">
* <td>message</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>A MessageSourceResolvable argument (direct or through JSP EL).</p></td>
* </tr>
* <tr class="altColor">
* <td>scope</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>The scope to use when exporting the result to a variable. This attribute
* is only used when var is also set. Possible values are page, request, session
* and application.</p></td>
* </tr>
* <tr class="rowColor">
* <td>text</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Default text to output when a message for the given code could not be
* found. If both text and code are not set, the tag will output null.</p></td>
* </tr>
* <tr class="altColor">
* <td>var</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>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).</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Jean-Pierre Pawlak
* @author Juergen Hoeller
* @see org.springframework.ui.context.Theme
......
......@@ -25,14 +25,59 @@ import org.springframework.lang.Nullable;
import org.springframework.web.util.TagUtils;
/**
* Tag for transforming reference data values from form controllers and
* other objects inside a {@code spring:bind} tag (or a data-bound
* form element tag from Spring's form tag library).
* The {@code <transform>} tag provides transformation for reference data values
* from controllers and other objects inside a {@code spring:bind} tag (or a
* data-bound form element tag from Spring's form tag library).
*
* <p>The BindTag has a PropertyEditor that it uses to transform properties of
* a bean to a String, usable in HTML forms. This tag uses that PropertyEditor
* to transform objects passed into this tag.
*
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td>htmlEscape</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Set HTML escaping for this tag, as boolean value. Overrides the default HTML
* escaping setting for the current page.</p></td>
* </tr>
* <tr class="rowColor">
* <td>scope</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>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.</p></td>
* </tr>
* <tr class="altColor">
* <td>value</p></td>
* <td>true</p></td>
* <td>true</p></td>
* <td>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.</p></td>
* </tr>
* <tr class="rowColor">
* <td>var</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>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).</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Alef Arendsen
* @author Juergen Hoeller
* @since 20.09.2003
......
......@@ -38,8 +38,8 @@ import org.springframework.web.util.TagUtils;
import org.springframework.web.util.UriUtils;
/**
* JSP tag for creating URLs. Modeled after the JSTL c:url tag with backwards
* compatibility in mind.
* The {@code <url>} tag creates URLs. Modeled after the JSTL c:url tag with
* backwards compatibility in mind.
*
* <p>Enhancements to the JSTL functionality include:
* <ul>
......@@ -68,9 +68,68 @@ import org.springframework.web.util.UriUtils;
* <pre class="code">&lt;spring:url value="/url/path/{variableName}"&gt;
* &lt;spring:param name="variableName" value="more than JSTL c:url" /&gt;
* &lt;/spring:url&gt;</pre>
* Results in:
*
* <p>The above results in:
* {@code /currentApplicationContext/url/path/more%20than%20JSTL%20c%3Aurl}
*
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td>value</p></td>
* <td>true</p></td>
* <td>true</p></td>
* <td>The URL to build. This value can include template {placeholders} that are
* replaced with the URL encoded value of the named parameter. Parameters
* must be defined using the param tag inside the body of this tag.</p></td>
* </tr>
* <tr class="rowColor">
* <td>context</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Specifies a remote application context path.
* The default is the current application context path.</p></td>
* </tr>
* <tr class="altColor">
* <td>var</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>The name of the variable to export the URL value to.
* If not specified the URL is written as output.</p></td>
* </tr>
* <tr class="rowColor">
* <td>scope</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>The scope for the var. 'application', 'session', 'request' and 'page'
* scopes are supported. Defaults to page scope. This attribute has no
* effect unless the var attribute is also defined.</p></td>
* </tr>
* <tr class="altColor">
* <td>htmlEscape</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Set HTML escaping for this tag, as a boolean value. Overrides the
* default HTML escaping setting for the current page.</p></td>
* </tr>
* <tr class="rowColor">
* <td>javaScriptEscape</p></td>
* <td>false</p></td>
* <td>true</p></td>
* <td>Set JavaScript escaping for this tag, as a boolean value.
* Default is false.</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Scott Andrews
* @since 3.0
* @see ParamTag
......
......@@ -21,8 +21,49 @@ import javax.servlet.jsp.JspException;
import org.springframework.web.servlet.support.RequestDataValueProcessor;
/**
* An HTML button tag. This tag is provided for completeness if the application
* relies on a {@link RequestDataValueProcessor}.
* The {@code <button>} tag renders a form field label in an HTML 'button' tag.
* It is provided for completeness if the application relies on a
* {@link RequestDataValueProcessor}.
*
* <p>
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td><p>disabled</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Setting the value of this attribute to 'true'
* will disable the HTML element.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>id</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>name</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>The name attribute for the HTML button tag</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>value</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>The name attribute for the HTML button tag</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Rossen Stoyanchev
* @since 3.1
......
......@@ -22,10 +22,8 @@ import javax.servlet.jsp.JspException;
import org.springframework.web.bind.WebDataBinder;
/**
* Databinding-aware JSP tag for rendering an HTML '{@code input}'
* element with a '{@code type}' of '{@code checkbox}'.
*
* <p>May be used in one of three different approaches depending on the
* The {@code <checkbox>} tag renders an HTML 'input' tag with type 'checkbox'.
* May be used in one of three different approaches depending on the
* type of the {@link #getValue bound value}.
*
* <h3>Approach One</h3>
......@@ -40,6 +38,184 @@ import org.springframework.web.bind.WebDataBinder;
* For any other bound value type, the '{@code input(checkbox)}' is marked as 'checked'
* if the configured {@link #setValue(Object) value} is equal to the bound value.
*
* <p>
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td><p>accesskey</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>cssErrorClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Used when the bound field has errors.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssStyle</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>dir</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>disabled</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Setting the value of this attribute to 'true'
* will disable the HTML element.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>htmlEscape</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Enable/disable HTML escaping of rendered values.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>id</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>label</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Value to be displayed as part of the tag</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>lang</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onblur</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onchange</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>ondblclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onfocus</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeydown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onkeypress</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeyup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmousedown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmousemove</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseout</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmouseover</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>path</p></td>
* <td><p>true</p></td>
* <td><p>true</p></td>
* <td><p>Path to property for data binding</p></td>
* </tr>
* <tr class="altColor">
* <td><p>tabindex</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>title</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>value</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Rob Harrop
* @author Juergen Hoeller
* @since 2.0
......
......@@ -21,10 +21,208 @@ import javax.servlet.jsp.JspException;
import org.springframework.web.bind.WebDataBinder;
/**
* Databinding-aware JSP tag for rendering multiple HTML '{@code input}'
* elements with a '{@code type}' of '{@code checkbox}'.
* The {@code <checkboxes>} tag renders multiple HTML 'input' tags with type 'checkbox'.
* Intended to be used with a Collection as the {@link #getItems()} bound value.
*
* <p>Intended to be used with a Collection as the {@link #getItems()} bound value}.
* <p>
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td><p>accesskey</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>cssErrorClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Used when the bound field has errors.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssStyle</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>delimiter</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Delimiter to use between each 'input' tag with type 'checkbox'.
* There is no delimiter by default.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>dir</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>disabled</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Setting the value of this attribute to 'true'
* will disable the HTML element.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>element</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Specifies the HTML element that is used to enclose each 'input' tag with
* type 'checkbox'. Defaults to 'span'.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>htmlEscape</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Enable/disable HTML escaping of rendered values.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>id</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>itemLabel</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Value to be displayed as part of the 'input' tags with type 'checkbox'</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>items</p></td>
* <td><p>true</p></td>
* <td><p>true</p></td>
* <td><p>The Collection, Map or array of objects used to generate the 'input' tags
* with type 'checkbox'</p></td>
* </tr>
* <tr class="altColor">
* <td><p>itemValue</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Name of the property mapped to 'value' attribute of the 'input' tags with
* type 'checkbox'</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>lang</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onblur</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onchange</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>ondblclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onfocus</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeydown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onkeypress</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeyup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmousedown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmousemove</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseout</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmouseover</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>path</p></td>
* <td><p>true</p></td>
* <td><p>true</p></td>
* <td><p>Path to property for data binding</p></td>
* </tr>
* <tr class="altColor">
* <td><p>tabindex</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>title</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Thomas Risberg
* @author Juergen Hoeller
......
......@@ -29,7 +29,8 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
/**
* Form tag for displaying errors for a particular field or object.
* The {@code <errors>} tag renders field errors in an HTML 'span' tag.
* Displays errors for either an object or a particular field.
*
* <p>This tag supports three main usage patterns:
*
......@@ -39,6 +40,149 @@ import org.springframework.util.StringUtils;
* <li>All errors - set '{@code path}' to '{@code *}'</li>
* </ol>
*
* <p>
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td><p>cssClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssStyle</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>delimiter</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Delimiter for displaying multiple error messages.
* Defaults to the br tag.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>dir</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>element</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Specifies the HTML element that is used to render the enclosing
* errors.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>htmlEscape</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Enable/disable HTML escaping of rendered values.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>id</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>lang</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>ondblclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onkeydown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeypress</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onkeyup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmousedown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmousemove</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmouseout</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseover</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmouseup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>path</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Path to errors object for data binding</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>tabindex</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>title</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Rob Harrop
* @author Juergen Hoeller
* @author Rick Evans
......
......@@ -35,14 +35,203 @@ import org.springframework.web.util.HtmlUtils;
import org.springframework.web.util.UriUtils;
/**
* Databinding-aware JSP tag for rendering an HTML '{@code form}' whose
* inner elements are bound to properties on a <em>form object</em>.
* The {@code <form>} tag renders an HTML 'form' tag and exposes a binding path to
* inner tags for binding.
*
* <p>Users should place the form object into the
* {@link org.springframework.web.servlet.ModelAndView ModelAndView} when
* populating the data for their view. The name of this form object can be
* configured using the {@link #setModelAttribute "modelAttribute"} property.
*
* <p>
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td><p>acceptCharset</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p><p>Specifies the list of character encodings for input data that is accepted
* by the server processing this form. The value is a space- and/or comma-delimited
* list of charset values. The client must interpret this list as an exclusive-or
* list, i.e., the server is able to accept any single character encoding per
* entity received.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>action</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p><p>HTML Required Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>cssClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssStyle</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>dir</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>enctype</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>htmlEscape</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Enable/disable HTML escaping of rendered values.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>id</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>lang</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>method</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>methodParam</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>The parameter name used for HTTP methods other then GET and POST.
* Default is '_method'.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>modelAttribute</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Name of the model attribute under which the form object is exposed.
* Defaults to 'command'.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>name</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute - added for backwards compatibility cases</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>ondblclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeydown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onkeypress</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeyup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmousedown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmousemove</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseout</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmouseover</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onreset</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onsubmit</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>servletRelativeAction</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Action reference to be appended to the current servlet path</p></td>
* </tr>
* <tr class="altColor">
* <td><p>target</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>title</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Rob Harrop
* @author Juergen Hoeller
* @author Scott Andrews
......
......@@ -19,14 +19,47 @@ package org.springframework.web.servlet.tags.form;
import javax.servlet.jsp.JspException;
/**
* Data-binding aware JSP tag for rendering a hidden HTML '{@code input}' field
* containing the databound value.
* The {@code <hidden>} tag renders an HTML 'input' tag with type 'hidden' using
* the bound value.
*
* <p>Example (binding to 'name' property of form backing object):
* <pre class="code>
* <pre class="code">
* &lt;form:hidden path=&quot;name&quot;/&gt;
* </pre>
*
* <p>
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td><p>htmlEscape</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Enable/disable HTML escaping of rendered values.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>id</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>path</p></td>
* <td><p>true</p></td>
* <td><p>true</p></td>
* <td><p>Path to property for data binding</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Rob Harrop
* @author Juergen Hoeller
* @author Rossen Stoyanchev
......
......@@ -19,8 +19,211 @@ package org.springframework.web.servlet.tags.form;
import javax.servlet.jsp.JspException;
/**
* Data-binding-aware JSP tag for rendering an HTML '{@code input}'
* element with a '{@code type}' of '{@code text}'.
* The {@code <input>} tag renders an HTML 'input' tag with type 'text' using
* the bound value.
*
* <p>
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td><p>accesskey</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>alt</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>autocomplete</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Common Optional Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>cssErrorClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Used when the bound field has errors.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssStyle</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>dir</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>disabled</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Setting the value of this attribute to
* 'true' will disable the HTML element.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>htmlEscape</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Enable/disable HTML escaping of rendered values.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>id</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>lang</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>maxlength</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onblur</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onchange</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>ondblclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onfocus</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeydown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onkeypress</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeyup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmousedown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmousemove</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseout</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmouseover</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onselect</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>path</p></td>
* <td><p>true</p></td>
* <td><p>true</p></td>
* <td><p>Path to property for data binding</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>readonly</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Setting the value of this attribute to
* 'true' will make the HTML element readonly.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>size</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>tabindex</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>title</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Rob Harrop
* @author Juergen Hoeller
......
......@@ -22,12 +22,152 @@ import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
/**
* Databinding-aware JSP tag for rendering an HTML '{@code label}' element
* that defines text that is associated with a single form element.
* The {@code <label>} tag renders a form field label in an HTML 'label' tag.
*
* <p>See the "formTags" showcase application that ships with the
* full Spring distribution for an example of this class in action.
*
* <p>
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td><p>cssClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssErrorClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Used only when errors are present.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>cssStyle</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>dir</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>for</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>htmlEscape</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Enable/disable HTML escaping of rendered values.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>id</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>lang</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>ondblclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onkeydown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeypress</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onkeyup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmousedown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmousemove</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmouseout</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseover</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmouseup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>path</p></td>
* <td><p>true</p></td>
* <td><p>true</p></td>
* <td><p>Path to errors object for data binding</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>tabindex</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>title</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Rob Harrop
* @author Juergen Hoeller
* @since 2.0
......
......@@ -25,7 +25,8 @@ import org.springframework.web.servlet.support.BindStatus;
import org.springframework.web.util.TagUtils;
/**
* JSP tag for rendering an HTML '{@code option}' tag.
* The {@code <option>} tag renders a single HTML 'option'. Sets 'selected' as
* appropriate based on bound value.
*
* <p><b>Must be used nested inside a {@link SelectTag}.</b>
*
......@@ -42,6 +43,155 @@ import org.springframework.web.util.TagUtils;
* then the {@link #setValue value} property will be used when rendering
* the inner text.
*
* <p>
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td><p>cssClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssErrorClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Used when the bound field has
* errors.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>cssStyle</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>dir</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>disabled</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Setting the value of this attribute to 'true'
* will disable the HTML element.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>htmlEscape</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Enable/disable HTML escaping of rendered values.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>id</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>label</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>lang</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>ondblclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeydown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onkeypress</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeyup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmousedown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmousemove</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseout</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmouseover</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>tabindex</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>title</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>value</p></td>
* <td><p>true</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Rob Harrop
* @author Juergen Hoeller
* @since 2.0
......
......@@ -25,12 +25,164 @@ import org.springframework.web.servlet.support.BindStatus;
import org.springframework.web.util.TagUtils;
/**
* Convenient tag that allows one to supply a collection of objects
* that are to be rendered as '{@code option}' tags within a
* '{@code select}' tag.
* The {@code <options>} tag renders a list of HTML 'option' tags.
* Sets 'selected' as appropriate based on bound value.
*
* <p><i>Must</i> be used within a {@link SelectTag 'select' tag}.
*
* <p>
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td><p>cssClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssErrorClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Used when the bound field has errors.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>cssStyle</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>dir</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>disabled</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>htmlEscape</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Enable/disable HTML escaping of rendered values.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>id</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>itemLabel</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Name of the property mapped to the inner text of the 'option' tag</p></td>
* </tr>
* <tr class="altColor">
* <td><p>items</p></td>
* <td><p>true</p></td>
* <td><p>true</p></td>
* <td><p>The Collection, Map or array of objects used to generate the inner 'option' tags</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>itemValue</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Name of the property mapped to 'value' attribute of the 'option' tag</p></td>
* </tr>
* <tr class="altColor">
* <td><p>lang</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>ondblclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeydown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onkeypress</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeyup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmousedown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmousemove</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseout</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmouseover</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>tabindex</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>title</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Rob Harrop
* @author Juergen Hoeller
* @author Scott Andrews
......
......@@ -19,8 +19,218 @@ package org.springframework.web.servlet.tags.form;
import javax.servlet.jsp.JspException;
/**
* Databinding-aware JSP tag for rendering an HTML '{@code input}'
* element with a '{@code type}' of '{@code password}'.
* The {@code <password>} tag renders an HTML 'input' tag with type 'password'
* using the bound value.
*
* <p>
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td><p>accesskey</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>alt</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>autocomplete</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Common Optional Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>cssErrorClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Used when the bound field has
* errors.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssStyle</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>dir</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>disabled</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Setting the value of this attribute to 'true'
* will disable the HTML element.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>htmlEscape</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Enable/disable HTML escaping of rendered values.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>id</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>lang</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>maxlength</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onblur</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onchange</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>ondblclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onfocus</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeydown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onkeypress</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeyup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmousedown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmousemove</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseout</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmouseover</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onselect</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>path</p></td>
* <td><p>true</p></td>
* <td><p>true</p></td>
* <td><p>Path to property for data binding</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>readonly</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Setting the value of this attribute to 'true'
* will make the HTML element readonly.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>showPassword</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Is the password value to be shown? Defaults to false.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>size</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>tabindex</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>title</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Rob Harrop
* @author Rick Evans
......
......@@ -19,8 +19,7 @@ package org.springframework.web.servlet.tags.form;
import javax.servlet.jsp.JspException;
/**
* Databinding-aware JSP tag for rendering an HTML '{@code input}'
* element with a '{@code type}' of '{@code radio}'.
* The {@code <radiobutton>} tag renders an HTML 'input' tag with type 'radio'.
*
* <p>Rendered elements are marked as 'checked' if the configured
* {@link #setValue(Object) value} matches the {@link #getValue bound value}.
......@@ -28,6 +27,184 @@ import javax.servlet.jsp.JspException;
* <p>A typical usage pattern will involved multiple tag instances bound
* to the same property but with different values.
*
* <p>
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td><p>accesskey</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>cssErrorClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Used when the bound field has errors.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssStyle</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>dir</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>disabled</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Setting the value of this attribute to 'true'
* will disable the HTML element.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>htmlEscape</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Enable/disable HTML escaping of rendered values.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>id</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>label</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Value to be displayed as part of the tag</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>lang</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onblur</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onchange</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>ondblclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onfocus</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeydown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onkeypress</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeyup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmousedown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmousemove</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseout</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmouseover</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>path</p></td>
* <td><p>true</p></td>
* <td><p>true</p></td>
* <td><p>Path to property for data binding</p></td>
* </tr>
* <tr class="altColor">
* <td><p>tabindex</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>title</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>value</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Rob Harrop
* @author Juergen Hoeller
* @since 2.0
......
......@@ -17,12 +17,213 @@
package org.springframework.web.servlet.tags.form;
/**
* Databinding-aware JSP tag for rendering multiple HTML '{@code input}'
* elements with a '{@code type}' of '{@code radio}'.
* The {@code <radiobuttons>} tag renders multiple HTML 'input' tags with type 'radio'.
*
* <p>Rendered elements are marked as 'checked' if the configured
* {@link #setItems(Object) value} matches the bound value.
*
* <p>
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td><p>accesskey</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>cssErrorClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Used when the bound field has
* errors.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssStyle</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>delimiter</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Delimiter to use between each 'input' tag with type 'radio'.
* There is no delimiter by default.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>dir</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>disabled</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Setting the value of this attribute to
* 'true' will disable the HTML element.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>element</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Specifies the HTML element that is used to enclose each 'input' tag
* with type 'radio'. Defaults to 'span'.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>htmlEscape</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Enable/disable HTML escaping of rendered values.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>id</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>itemLabel</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Value to be displayed as part of the 'input' tags with type
* 'radio'</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>items</p></td>
* <td><p>true</p></td>
* <td><p>true</p></td>
* <td><p>The Collection, Map or array of objects used to generate the 'input'
* tags with type 'radio'</p></td>
* </tr>
* <tr class="altColor">
* <td><p>itemValue</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Name of the property mapped to 'value' attribute of the 'input' tags
* with type 'radio'</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>lang</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onblur</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onchange</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>ondblclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onfocus</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeydown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onkeypress</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeyup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmousedown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmousemove</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseout</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmouseover</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>path</p></td>
* <td><p>true</p></td>
* <td><p>true</p></td>
* <td><p>Path to property for data binding</p></td>
* </tr>
* <tr class="altColor">
* <td><p>tabindex</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>title</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Thomas Risberg
* @author Juergen Hoeller
* @since 2.5
......
......@@ -25,8 +25,8 @@ import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.servlet.support.BindStatus;
/**
* Databinding-aware JSP tag that renders an HTML '{@code select}'
* element.
* The {@code <select>} tag renders an HTML 'select' element.
* Supports data binding to the selected option.
*
* <p>Inner '{@code option}' tags can be rendered using one of the
* approaches supported by the OptionWriter class.
......@@ -34,6 +34,204 @@ import org.springframework.web.servlet.support.BindStatus;
* <p>Also supports the use of nested {@link OptionTag OptionTags} or
* (typically one) nested {@link OptionsTag}.
*
* <p>
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td><p>accesskey</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>cssErrorClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Used when the bound field has errors.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssStyle</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>dir</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>disabled</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Setting the value of this attribute to 'true'
* will disable the HTML element.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>htmlEscape</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Enable/disable HTML escaping of rendered values.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>id</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>itemLabel</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Name of the property mapped to the inner text of the 'option' tag</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>items</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>The Collection, Map or array of objects used to generate the inner
* 'option' tags</p></td>
* </tr>
* <tr class="altColor">
* <td><p>itemValue</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Name of the property mapped to 'value' attribute of the 'option'
* tag</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>lang</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>multiple</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onblur</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onchange</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>ondblclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onfocus</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onkeydown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeypress</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onkeyup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmousedown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmousemove</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmouseout</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseover</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmouseup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>path</p></td>
* <td><p>true</p></td>
* <td><p>true</p></td>
* <td><p>Path to property for data binding</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>size</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>tabindex</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>title</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Rob Harrop
* @author Juergen Hoeller
* @since 2.0
......
......@@ -19,7 +19,198 @@ package org.springframework.web.servlet.tags.form;
import javax.servlet.jsp.JspException;
/**
* Databinding-aware JSP tag for rendering an HTML '{@code textarea}'.
* The {@code <textarea>} tag renders an HTML 'textarea'.
*
* <p>
* <table>
* <caption>Attribute Summary</caption>
* <thead>
* <tr>
* <th class="colFirst">Attribute</th>
* <th class="colOne">Required?</th>
* <th class="colOne">Runtime Expression?</th>
* <th class="colLast">Description</th>
* </tr>
* </thead>
* <tbody>
* <tr class="altColor">
* <td><p>accesskey</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cols</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Required Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>cssClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>cssErrorClass</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Used when the bound field has errors.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>cssStyle</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>dir</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>disabled</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Setting the value of this attribute to 'true'
* will disable the HTML element.</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>htmlEscape</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>Enable/disable HTML escaping of rendered values.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>id</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>lang</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onblur</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onchange</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>ondblclick</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onfocus</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeydown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onkeypress</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onkeyup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmousedown</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmousemove</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseout</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onmouseover</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>onmouseup</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>onselect</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Event Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>path</p></td>
* <td><p>true</p></td>
* <td><p>true</p></td>
* <td><p>Path to property for data binding</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>readonly</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Optional Attribute. Setting the value of this attribute to 'true'
* will make the HTML element readonly.</p></td>
* </tr>
* <tr class="altColor">
* <td><p>rows</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Required Attribute</p></td>
* </tr>
* <tr class="rowColor">
* <td><p>tabindex</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* <tr class="altColor">
* <td><p>title</p></td>
* <td><p>false</p></td>
* <td><p>true</p></td>
* <td><p>HTML Standard Attribute</p></td>
* </tr>
* </tbody>
* </table>
*
* @author Rob Harrop
* @author Juergen Hoeller
......
/**
* Spring's form tag library for JSP 2.0+.
* Supports JSP view implementations for Spring's web MVC framework.
* See {@code spring-form.tld} for descriptions of the various tags.
* For more details on each tag, see the list of tags below with links to
* individual tag classes, or check the {@code spring-form.tld} file:
*
* <ul>
* <li>{@link org.springframework.web.servlet.tags.form.ButtonTag The button tag}
* <li>{@link org.springframework.web.servlet.tags.form.CheckboxTag The checkbox tag}
* <li>{@link org.springframework.web.servlet.tags.form.CheckboxesTag The checkboxes tag}
* <li>{@link org.springframework.web.servlet.tags.form.ErrorsTag The errors tag}
* <li>{@link org.springframework.web.servlet.tags.form.FormTag The form tag}
* <li>{@link org.springframework.web.servlet.tags.form.HiddenInputTag The hidden tag}
* <li>{@link org.springframework.web.servlet.tags.form.InputTag The input tag}
* <li>{@link org.springframework.web.servlet.tags.form.LabelTag The label tag}
* <li>{@link org.springframework.web.servlet.tags.form.OptionTag The option tag}
* <li>{@link org.springframework.web.servlet.tags.form.OptionsTag The options tag}
* <li>{@link org.springframework.web.servlet.tags.form.PasswordInputTag The password tag}
* <li>{@link org.springframework.web.servlet.tags.form.RadioButtonTag The radiobutton tag}
* <li>{@link org.springframework.web.servlet.tags.form.RadioButtonsTag The radiobuttons tag}
* <li>{@link org.springframework.web.servlet.tags.form.SelectTag The select tag}
* <li>{@link org.springframework.web.servlet.tags.form.TextareaTag The textarea tag}
* </ul>
*/
package org.springframework.web.servlet.tags.form;
/**
* Spring's JSP standard tag library for JSP 2.0+.
* Supports JSP view implementations within Spring's web MVC framework.
* See {@code spring.tld} for descriptions of the various tags.
* <p>This package contains Spring's JSP standard tag library for JSP 2.0+.
* Supports JSP view implementations within Spring's Web MVC framework.
* For more details on each tag, see the list of tags below with links to
* individual tag classes, or check the {@code spring.tld} file:
*
* <ul>
* <li>{@link org.springframework.web.servlet.tags.ArgumentTag The argument tag}
* <li>{@link org.springframework.web.servlet.tags.BindTag The bind tag}
* <li>{@link org.springframework.web.servlet.tags.BindErrorsTag The hasBindErrors tag}
* <li>{@link org.springframework.web.servlet.tags.EscapeBodyTag The escapeBody tag}
* <li>{@link org.springframework.web.servlet.tags.EvalTag The eval tag}
* <li>{@link org.springframework.web.servlet.tags.HtmlEscapeTag The htmlEscape tag}
* <li>{@link org.springframework.web.servlet.tags.MessageTag The message tag}
* <li>{@link org.springframework.web.servlet.tags.NestedPathTag The nestedPath tag}
* <li>{@link org.springframework.web.servlet.tags.ParamTag The param tag}
* <li>{@link org.springframework.web.servlet.tags.ThemeTag The theme tag}
* <li>{@link org.springframework.web.servlet.tags.TransformTag The transform tag}
* <li>{@link org.springframework.web.servlet.tags.UrlTag The url tag}
* </ul>
*
* <p>Please note that the various tags generated by this form tag library are
* compliant with http://www.w3.org/TR/xhtml1/ and attendant
* http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Strict.
*/
@NonNullApi
@NonNullFields
......
[[spring-tld]]
= spring JSP Tag Library
[[spring.tld-intro]]
== Introduction
One of the view technologies you can use with the Spring Framework is Java Server Pages
(JSPs). To help you implement views using Java Server Pages the Spring Framework
provides you with some tags for evaluating errors, setting themes and outputting
internationalized messages.
Please note that the various tags generated by this form tag library are compliant with
the http://www.w3.org/TR/xhtml1/[XHTML-1.0-Strict specification] and attendant
http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Strict[DTD].
This appendix describes the `spring.tld` tag library.
* <<spring.tld.argument>>
* <<spring.tld.bind>>
* <<spring.tld.escapeBody>>
* <<spring.tld.hasBindErrors>>
* <<spring.tld.htmlEscape>>
* <<spring.tld.message>>
* <<spring.tld.nestedPath>>
* <<spring.tld.param>>
* <<spring.tld.theme>>
* <<spring.tld.transform>>
* <<spring.tld.url>>
* <<spring.tld.eval>>
[[spring.tld.argument]]
== The argument tag
Argument tag based on the JSTL fmt:param tag. The purpose is to support arguments
inside the message and theme tags.
[[spring.tld.argument.table]]
[cols="1,1,1,3"]
.Attributes
|===
| Attribute| Required?| Runtime Expression?| Description
| value
| false
| true
| The value of the argument.
|===
[[spring.tld.bind]]
== The bind tag
Provides BindStatus object for the given bind path. 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).
[[spring.tld.bind.table]]
.Attributes
[cols="1,1,1,3"]
|===
| 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.
| ignoreNestedPath
| false
| true
| Set whether to ignore a nested path, if any. Default is to not ignore.
| path
| true
| true
| The path to the bean or bean property to bind status information for. For instance
account.name, company.address.zipCode or just employee. The status object will
exported to the page scope, specifically for this bean or bean property
|===
[[spring.tld.escapeBody]]
== The escapeBody tag
Escapes its enclosed body content, applying HTML escaping and/or JavaScript escaping.
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).
[[spring.tld.escapeBody.table]]
.Attributes
[cols="1,1,1,3"]
|===
| 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.
| javaScriptEscape
| false
| true
| Set JavaScript escaping for this tag, as boolean value. Default is false.
|===
[[spring.tld.eval]]
== The eval tag
Evaluates a Spring expression (SpEL) and either prints the result or assigns it to a
variable.
[[spring.tld.eval.table]]
[cols="1,1,1,3"]
.Attributes
|===
| Attribute| Required?| Runtime Expression?| Description
| expression
| true
| true
| The expression to evaluate.
| htmlEscape
| false
| true
| Set HTML escaping for this tag, as a boolean value. Overrides the default HTML
escaping setting for the current page.
| javaScriptEscape
| false
| true
| Set JavaScript escaping for this tag, as a boolean value. Default is false.
| scope
| false
| true
| The scope for the var. 'application', 'session', 'request' and 'page' scopes are
supported. Defaults to page scope. This attribute has no effect unless the var
attribute is also defined.
| var
| false
| true
| The name of the variable to export the evaluation result to. If not specified the
evaluation result is converted to a String and written as output.
|===
[[spring.tld.hasBindErrors]]
== The hasBindErrors tag
Provides Errors instance in case of bind errors. 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).
[[spring.tld.hasBindErrors.table]]
.Attributes
[cols="1,1,1,3"]
|===
| 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.
| name
| true
| true
| The name of the bean in the request, that needs to be inspected for errors. If errors
are available for this bean, they will be bound under the 'errors' key.
|===
[[spring.tld.htmlEscape]]
== The htmlEscape tag
Sets default HTML escape value for the current page. Overrides a "defaultHtmlEscape"
context-param in web.xml, if any.
[[spring.tld.htmlEscape.table]]
.Attributes
[cols="1,1,1,3"]
|===
| Attribute| Required?| Runtime Expression?| Description
| defaultHtmlEscape
| true
| true
| Set the default value for HTML escaping, to be put into the current PageContext.
|===
[[spring.tld.message]]
== The message tag
Retrieves the message with the given code, or text if code isn't resolvable. 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).
[[spring.tld.message.table]]
.Attributes
[cols="1,1,1,3"]
|===
| Attribute| Required?| Runtime Expression?| Description
| arguments
| false
| true
| Set optional message arguments for this tag, as a (comma-)delimited String (each
String argument can contain JSP EL), an Object array (used as argument array), or a
single Object (used as single argument).
| argumentSeparator
| false
| true
| The separator character to be used for splitting the arguments string value; defaults
to a 'comma' (',').
| code
| false
| true
| The code (key) to use when looking up the message. If code is not provided, the text
attribute will be used.
| htmlEscape
| false
| true
| Set HTML escaping for this tag, as boolean value. Overrides the default HTML escaping
setting for the current page.
| javaScriptEscape
| false
| true
| Set JavaScript escaping for this tag, as boolean value. Default is false.
| message
| false
| true
| A MessageSourceResolvable argument (direct or through JSP EL). Fits nicely when used
in conjunction with Spring's own validation error classes which all implement the
MessageSourceResolvable interface. For example, this allows you to iterate over all of
the errors in a form, passing each error (using a runtime expression) as the value of
this 'message' attribute, thus effecting the easy display of such error messages.
| scope
| false
| true
| The scope to use when exporting the result to a variable. This attribute is only used
when var is also set. Possible values are page, request, session and application.
| text
| false
| true
| Default text to output when a message for the given code could not be found. If both
text and code are not set, the tag will output null.
| 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).
|===
[[spring.tld.nestedPath]]
== The nestedPath tag
Sets a nested path to be used by the bind tag's path.
[[spring.tld.nestedPath.table]]
.Attributes
[cols="1,1,1,3"]
|===
| Attribute| Required?| Runtime Expression?| Description
| path
| true
| true
| Set the path that this tag should apply. E.g. 'customer' to allow bind paths like
'address.street' rather than 'customer.address.street'.
|===
[[spring.tld.param]]
== The param tag
Parameter tag based on the JSTL c:param tag. The sole purpose is to support params
inside the url tag.
[[spring.tld.param.table]]
[cols="1,1,1,3"]
.Attributes
|===
| Attribute| Required?| Runtime Expression?| Description
| name
| true
| true
| The name of the parameter.
| value
| false
| true
| The value of the parameter.
|===
[[spring.tld.theme]]
== The theme tag
Retrieves the theme message with the given code, or text if code isn't resolvable. 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).
[[spring.tld.theme.table]]
.Attributes
[cols="1,1,1,3"]
|===
| Attribute| Required?| Runtime Expression?| Description
| arguments
| false
| true
| Set optional message arguments for this tag, as a (comma-)delimited String (each
String argument can contain JSP EL), an Object array (used as argument array), or a
single Object (used as single argument).
| argumentSeparator
| false
| true
| The separator character to be used for splitting the arguments string value; defaults
to a 'comma' (',').
| code
| false
| true
| The code (key) to use when looking up the message. If code is not provided, the text
attribute will be used.
| htmlEscape
| false
| true
| Set HTML escaping for this tag, as boolean value. Overrides the default HTML escaping
setting for the current page.
| javaScriptEscape
| false
| true
| Set JavaScript escaping for this tag, as boolean value. Default is false.
| message
| false
| true
| A MessageSourceResolvable argument (direct or through JSP EL).
| scope
| false
| true
| The scope to use when exporting the result to a variable. This attribute is only used
when var is also set. Possible values are page, request, session and application.
| text
| false
| true
| Default text to output when a message for the given code could not be found. If both
text and code are not set, the tag will output null.
| 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).
|===
[[spring.tld.transform]]
== 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).
[[spring.tld.transform.table]]
.Attributes
[cols="1,1,1,3"]
|===
| 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).
|===
[[spring.tld.url]]
== The url tag
Creates URLs with support for URI template variables, HTML/XML escaping, and Javascript
escaping. Modeled after the JSTL c:url tag with backwards compatibility in mind.
[[spring.tld.url.table]]
.Attributes
[cols="1,1,1,3"]
|===
| Attribute| Required?| Runtime Expression?| Description
| value
| true
| true
| The URL to build. This value can include template {placeholders} that are replaced
with the URL encoded value of the named parameter. Parameters must be defined using
the param tag inside the body of this tag.
| context
| false
| true
| Specifies a remote application context path. The default is the current application
context path.
| var
| false
| true
| The name of the variable to export the URL value to. If not specified the URL is
written as output.
| scope
| false
| true
| The scope for the var. 'application', 'session', 'request' and 'page' scopes are
supported. Defaults to page scope. This attribute has no effect unless the var
attribute is also defined.
| htmlEscape
| false
| true
| Set HTML escaping for this tag, as a boolean value. Overrides the default HTML
escaping setting for the current page.
| javaScriptEscape
| false
| true
| Set JavaScript escaping for this tag, as a boolean value. Default is false.
|===
......@@ -574,10 +574,10 @@ earlier chapters. To facilitate the development of JSP pages in combination with
data binding features, Spring provides a few tags that make things even easier. All
Spring tags have__HTML escaping__ features to enable or disable escaping of characters.
The tag library descriptor (TLD) is included in the `spring-webmvc.jar`. For information
on individual tags, see the API reference for the
{api-spring-framework}/web/servlet/tags/package-summary.html[spring tags] and the .
{api-spring-framework}/web/servlet/tags/form/package-summary.html[spring-form tags]
The `spring.tld` tag library descriptor (TLD) is included in the `spring-webmvc.jar`.
For a comprehensive reference on individual tags, browse the
{api-spring-framework}/web/servlet/tags/package-summary.html#package.description[API reference]
or see the tag library description.
[[mvc-view-jsp-formtaglib]]
......@@ -1259,6 +1259,11 @@ The HTML would look like:
</form>
----
The `spring-form.tld` tag library descriptor (TLD) is included in the `spring-webmvc.jar`.
For a comprehensive reference on individual tags, browse the
{api-spring-framework}/web/servlet/tags/form/package-summary.html#package.description[API reference]
or see the tag library description.
[[mvc-rest-method-conversion]]
==== HTTP Method Conversion
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册