Browse Source

Consistent JSP tag documentation

Issue: SPR-13520
pull/907/head
Juergen Hoeller 11 years ago
parent
commit
a778468771
  1. 3
      spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ArgumentAware.java
  2. 44
      spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ArgumentTag.java
  3. 56
      spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ParamTag.java
  4. 28
      spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
  5. 159
      spring-webmvc/src/main/resources/META-INF/spring-form.tld
  6. 137
      spring-webmvc/src/main/resources/META-INF/spring.tld
  7. 115
      src/asciidoc/appx-spring-form-tld.adoc
  8. 138
      src/asciidoc/appx-spring-tld.adoc

3
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ArgumentAware.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -33,4 +33,5 @@ public interface ArgumentAware { @@ -33,4 +33,5 @@ public interface ArgumentAware {
* @param argument the result of the nested {@code spring:argument} tag
*/
void addArgument(Object argument) throws JspTagException;
}

44
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ArgumentTag.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -20,8 +20,8 @@ import javax.servlet.jsp.JspException; @@ -20,8 +20,8 @@ import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
/**
* JSP tag for collecting arguments and passing them to an {@link ArgumentAware} ancestor
* in the tag hierarchy.
* JSP tag for collecting arguments and passing them to an {@link ArgumentAware}
* ancestor in the tag hierarchy.
*
* <p>This tag must be nested under an argument aware tag.
*
@ -37,7 +37,17 @@ public class ArgumentTag extends BodyTagSupport { @@ -37,7 +37,17 @@ public class ArgumentTag extends BodyTagSupport {
private boolean valueSet;
// tag lifecycle
/**
* Set the value of the argument (optional).
* <pIf not set, the tag's body content will get evaluated.
* @param value the parameter value
*/
public void setValue(Object value) {
this.value = value;
this.valueSet = true;
}
@Override
public int doEndTag() throws JspException {
@ -46,38 +56,20 @@ public class ArgumentTag extends BodyTagSupport { @@ -46,38 +56,20 @@ public class ArgumentTag extends BodyTagSupport {
argument = this.value;
}
else if (getBodyContent() != null) {
// get the value from the tag body
// Get the value from the tag body
argument = getBodyContent().getString().trim();
}
// find a param aware ancestor
ArgumentAware argumentAwareTag = (ArgumentAware) findAncestorWithClass(this,
ArgumentAware.class);
// Find a param-aware ancestor
ArgumentAware argumentAwareTag = (ArgumentAware) findAncestorWithClass(this, ArgumentAware.class);
if (argumentAwareTag == null) {
throw new JspException(
"The argument tag must be a descendant of a tag that supports arguments");
throw new JspException("The argument tag must be a descendant of a tag that supports arguments");
}
argumentAwareTag.addArgument(argument);
return EVAL_PAGE;
}
// tag attribute mutators
/**
* Sets the value of the argument
*
* <p>
* Optional. If not set, the tag's body content is evaluated.
*
* @param value the parameter value
*/
public void setValue(Object value) {
this.value = value;
this.valueSet = true;
}
@Override
public void release() {
super.release();

56
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ParamTag.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -40,7 +40,22 @@ public class ParamTag extends BodyTagSupport { @@ -40,7 +40,22 @@ public class ParamTag extends BodyTagSupport {
private boolean valueSet;
// tag lifecycle
/**
* Set the name of the parameter (required).
*/
public void setName(String name) {
this.name = name;
}
/**
* Set the value of the parameter (optional).
*/
public void setValue(String value) {
this.value = value;
this.valueSet = true;
}
@Override
public int doEndTag() throws JspException {
@ -50,16 +65,14 @@ public class ParamTag extends BodyTagSupport { @@ -50,16 +65,14 @@ public class ParamTag extends BodyTagSupport {
param.setValue(this.value);
}
else if (getBodyContent() != null) {
// get the value from the tag body
// Get the value from the tag body
param.setValue(getBodyContent().getString().trim());
}
// find a param aware ancestor
ParamAware paramAwareTag = (ParamAware) findAncestorWithClass(this,
ParamAware.class);
// Find a param aware ancestor
ParamAware paramAwareTag = (ParamAware) findAncestorWithClass(this, ParamAware.class);
if (paramAwareTag == null) {
throw new JspException(
"The param tag must be a descendant of a tag that supports parameters");
throw new JspException("The param tag must be a descendant of a tag that supports parameters");
}
paramAwareTag.addParam(param);
@ -67,33 +80,6 @@ public class ParamTag extends BodyTagSupport { @@ -67,33 +80,6 @@ public class ParamTag extends BodyTagSupport {
return EVAL_PAGE;
}
// tag attribute accessors
/**
* Sets the name of the parameter
*
* <p>
* Required
*
* @param name the parameter name
*/
public void setName(String name) {
this.name = name;
}
/**
* Sets the value of the parameter
*
* <p>
* Optional. If not set, the tag's body content is evaluated
*
* @param value the parameter value
*/
public void setValue(String value) {
this.value = value;
this.valueSet = true;
}
@Override
public void release() {
super.release();

28
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -194,15 +194,18 @@ public class FormTag extends AbstractHtmlElementTag { @@ -194,15 +194,18 @@ public class FormTag extends AbstractHtmlElementTag {
}
/**
* Set the value of the '{@code action}' attribute.
* Set the value of the '{@code action}' attribute through a value
* that is to be appended to the current servlet path.
* <p>May be a runtime expression.
* @since 3.2.3
*/
public void setServletRelativeAction(String servletRelativeaction) {
this.servletRelativeAction = (servletRelativeaction != null ? servletRelativeaction : "");
public void setServletRelativeAction(String servletRelativeAction) {
this.servletRelativeAction = (servletRelativeAction != null ? servletRelativeAction : "");
}
/**
* Get the value of the '{@code action}' attribute.
* Get the servlet-relative value of the '{@code action}' attribute.
* @since 3.2.3
*/
protected String getServletRelativeAction() {
return this.servletRelativeAction;
@ -322,7 +325,19 @@ public class FormTag extends AbstractHtmlElementTag { @@ -322,7 +325,19 @@ public class FormTag extends AbstractHtmlElementTag {
/**
* Get the name of the request param for non-browser supported HTTP methods.
* @since 4.2.3
*/
@SuppressWarnings("deprecation")
protected String getMethodParam() {
return getMethodParameter();
}
/**
* Get the name of the request param for non-browser supported HTTP methods.
* @deprecated as of 4.2.3, in favor of {@link #getMethodParam()} which is
* a proper pairing for {@link #setMethodParam(String)}
*/
@Deprecated
protected String getMethodParameter() {
return this.methodParam;
}
@ -334,6 +349,7 @@ public class FormTag extends AbstractHtmlElementTag { @@ -334,6 +349,7 @@ public class FormTag extends AbstractHtmlElementTag {
return ("get".equalsIgnoreCase(method) || "post".equalsIgnoreCase(method));
}
/**
* Writes the opening part of the block '{@code form}' tag and exposes
* the form object name in the {@link javax.servlet.jsp.PageContext}.
@ -359,7 +375,7 @@ public class FormTag extends AbstractHtmlElementTag { @@ -359,7 +375,7 @@ public class FormTag extends AbstractHtmlElementTag {
if (!isMethodBrowserSupported(getMethod())) {
assertHttpMethod(getMethod());
String inputName = getMethodParameter();
String inputName = getMethodParam();
String inputType = "hidden";
tagWriter.startTag(INPUT_TAG);
writeOptionalAttribute(tagWriter, TYPE_ATTRIBUTE, inputType);

159
spring-webmvc/src/main/resources/META-INF/spring-form.tld

@ -10,7 +10,8 @@ @@ -10,7 +10,8 @@
<uri>http://www.springframework.org/tags/form</uri>
<tag>
<description>Renders an HTML 'form' tag and exposes a binding path to inner tags for binding.</description>
<description>Renders an HTML 'form' tag and exposes a binding path to inner tags
for binding.</description>
<name>form</name>
<tag-class>org.springframework.web.servlet.tags.form.FormTag</tag-class>
<body-content>JSP</body-content>
@ -124,14 +125,14 @@ @@ -124,14 +125,14 @@
</attribute>
<attribute>
<description>Name of the model attribute under which the form object is exposed.
Defaults to 'command'.</description>
Defaults to 'command'.</description>
<name>modelAttribute</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Name of the model attribute under which the form object is exposed.
Defaults to 'command'.</description>
Defaults to 'command'.</description>
<name>commandName</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -143,7 +144,7 @@ @@ -143,7 +144,7 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>HTML Required Attribute</description>
<description>Action reference to be appended to the current servlet path</description>
<name>servletRelativeAction</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -167,7 +168,10 @@ @@ -167,7 +168,10 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>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.</description>
<description>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.</description>
<name>acceptCharset</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -191,7 +195,8 @@ @@ -191,7 +195,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>The parameter name used for HTTP methods other then GET and POST. Default is '_method'</description>
<description>The parameter name used for HTTP methods other then GET and POST.
Default is '_method'.</description>
<name>methodParam</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -229,7 +234,8 @@ @@ -229,7 +234,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description>
<description>Equivalent to "class" - HTML Optional Attribute.
Used when the bound field has errors.</description>
<name>cssErrorClass</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -265,7 +271,8 @@ @@ -265,7 +271,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will disable the HTML element.</description>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true'
will disable the HTML element.</description>
<name>disabled</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -379,7 +386,8 @@ @@ -379,7 +386,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will make the HTML element readonly.</description>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true'
will make the HTML element readonly.</description>
<name>readonly</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -423,7 +431,8 @@ @@ -423,7 +431,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description>
<description>Equivalent to "class" - HTML Optional Attribute.
Used when the bound field has errors.</description>
<name>cssErrorClass</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -459,7 +468,8 @@ @@ -459,7 +468,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will disable the HTML element.</description>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true'
will disable the HTML element.</description>
<name>disabled</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -573,7 +583,8 @@ @@ -573,7 +583,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will make the HTML element readonly.</description>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true'
will make the HTML element readonly.</description>
<name>readonly</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -623,7 +634,8 @@ @@ -623,7 +634,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description>
<description>Equivalent to "class" - HTML Optional Attribute.
Used when the bound field has errors.</description>
<name>cssErrorClass</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -659,7 +671,8 @@ @@ -659,7 +671,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will disable the HTML element.</description>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true'
will disable the HTML element.</description>
<name>disabled</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -728,7 +741,8 @@ @@ -728,7 +741,8 @@
</tag>
<tag>
<description>Renders an HTML 'select' element. Supports databinding to the selected option.</description>
<description>Renders an HTML 'select' element. Supports data binding to the
selected option.</description>
<name>select</name>
<tag-class>org.springframework.web.servlet.tags.form.SelectTag</tag-class>
<body-content>JSP</body-content>
@ -757,7 +771,8 @@ @@ -757,7 +771,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description>
<description>Equivalent to "class" - HTML Optional Attribute.
Used when the bound field has errors.</description>
<name>cssErrorClass</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -793,7 +808,8 @@ @@ -793,7 +808,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will disable the HTML element.</description>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true'
will disable the HTML element.</description>
<name>disabled</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -883,19 +899,22 @@ @@ -883,19 +899,22 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>The Collection, Map or array of objects used to generate the inner 'option' tags</description>
<description>The Collection, Map or array of objects used to generate the
inner 'option' tags</description>
<name>items</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Name of the property mapped to 'value' attribute of the 'option' tag</description>
<description>Name of the property mapped to 'value' attribute of the
'option' tag</description>
<name>itemValue</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Name of the property mapped to the inner text of the 'option' tag</description>
<description>Name of the property mapped to the inner text of the
'option' tag</description>
<name>itemLabel</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -916,7 +935,8 @@ @@ -916,7 +935,8 @@
</tag>
<tag>
<description>Renders a single HTML 'option'. Sets 'selected' as appropriate based on bound value.</description>
<description>Renders a single HTML 'option'.
Sets 'selected' as appropriate based on bound value.</description>
<name>option</name>
<tag-class>org.springframework.web.servlet.tags.form.OptionTag</tag-class>
<body-content>JSP</body-content>
@ -926,8 +946,9 @@ @@ -926,8 +946,9 @@
<variable-class>java.lang.Object</variable-class>
</variable>
<variable>
<description>The String representation of thr value bound to the 'value' attribute, taking into consideration
any PropertyEditor associated with the enclosing 'select' tag.</description>
<description>The String representation of thr value bound to the 'value'
attribute, taking into consideration any PropertyEditor associated with
the enclosing 'select' tag.</description>
<name-given>displayValue</name-given>
<variable-class>java.lang.String</variable-class>
</variable>
@ -962,7 +983,8 @@ @@ -962,7 +983,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description>
<description>Equivalent to "class" - HTML Optional Attribute.
Used when the bound field has errors.</description>
<name>cssErrorClass</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -998,7 +1020,8 @@ @@ -998,7 +1020,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will disable the HTML element.</description>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true'
will disable the HTML element.</description>
<name>disabled</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -1067,7 +1090,8 @@ @@ -1067,7 +1090,8 @@
</tag>
<tag>
<description>Renders a list of HTML 'option' tags. Sets 'selected' as appropriate based on bound value.</description>
<description>Renders a list of HTML 'option' tags. Sets 'selected' as appropriate
based on bound value.</description>
<name>options</name>
<tag-class>org.springframework.web.servlet.tags.form.OptionsTag</tag-class>
<body-content>empty</body-content>
@ -1078,7 +1102,9 @@ @@ -1078,7 +1102,9 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>The Collection, Map or array of objects used to generate the inner 'option' tags. This attribute is required unless the containing select's property for data binding is an Enum, in which case the enum's values are used.</description>
<description>The Collection, Map or array of objects used to generate the inner
'option' tags. This attribute is required unless the containing select's property
for data binding is an Enum, in which case the enum's values are used.</description>
<name>items</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -1108,7 +1134,8 @@ @@ -1108,7 +1134,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description>
<description>Equivalent to "class" - HTML Optional Attribute.
Used when the bound field has errors.</description>
<name>cssErrorClass</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -1144,7 +1171,8 @@ @@ -1144,7 +1171,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true' (without the quotes) will disable the HTML element.</description>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true'
will disable the HTML element.</description>
<name>disabled</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -1242,7 +1270,8 @@ @@ -1242,7 +1270,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description>
<description>Equivalent to "class" - HTML Optional Attribute.
Used when the bound field has errors.</description>
<name>cssErrorClass</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -1278,7 +1307,8 @@ @@ -1278,7 +1307,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.</description>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true'
will disable the HTML element.</description>
<name>disabled</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -1412,7 +1442,8 @@ @@ -1412,7 +1442,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description>
<description>Equivalent to "class" - HTML Optional Attribute.
Used when the bound field has errors.</description>
<name>cssErrorClass</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -1448,7 +1479,8 @@ @@ -1448,7 +1479,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.</description>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true'
will disable the HTML element.</description>
<name>disabled</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -1538,31 +1570,37 @@ @@ -1538,31 +1570,37 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>The Collection, Map or array of objects used to generate the 'input' tags with type 'radio'. This attribute is required unless the property for data binding is an Enum, in which case the enum's values are used.</description>
<description>The Collection, Map or array of objects used to generate the 'input'
tags with type 'radio'. This attribute is required unless the property for data
binding is an Enum, in which case the enum's values are used.</description>
<name>items</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Name of the property mapped to 'value' attribute of the 'input' tags with type 'radio'</description>
<description>Name of the property mapped to 'value' attribute of the 'input'
tags with type 'radio'</description>
<name>itemValue</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Value to be displayed as part of the 'input' tags with type 'radio'</description>
<description>Value to be displayed as part of the 'input' tags with type
'radio'</description>
<name>itemLabel</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Delimiter to use between each 'input' tag with type 'radio'. There is no delimiter by default.</description>
<description>Delimiter to use between each 'input' tag with type 'radio'.
There is no delimiter by default.</description>
<name>delimiter</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Specifies the HTML element that is used to enclose each 'input' tag with type 'radio'. Defaults to 'span'.</description>
<description>Specifies the HTML element that is used to enclose each 'input'
tag with type 'radio'. Defaults to 'span'.</description>
<name>element</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -1600,7 +1638,8 @@ @@ -1600,7 +1638,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description>
<description>Equivalent to "class" - HTML Optional Attribute.
Used when the bound field has errors.</description>
<name>cssErrorClass</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -1636,7 +1675,8 @@ @@ -1636,7 +1675,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.</description>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true'
will disable the HTML element.</description>
<name>disabled</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -1770,7 +1810,8 @@ @@ -1770,7 +1810,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description>
<description>Equivalent to "class" - HTML Optional Attribute.
Used when the bound field has errors.</description>
<name>cssErrorClass</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -1806,7 +1847,8 @@ @@ -1806,7 +1847,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.</description>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true'
will disable the HTML element.</description>
<name>disabled</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -1896,31 +1938,36 @@ @@ -1896,31 +1938,36 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>The Collection, Map or array of objects used to generate the 'input' tags with type 'checkbox'</description>
<description>The Collection, Map or array of objects used to generate the
'input' tags with type 'checkbox'</description>
<name>items</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Name of the property mapped to 'value' attribute of the 'input' tags with type 'checkbox'</description>
<description>Name of the property mapped to 'value' attribute of the 'input'
tags with type 'checkbox'</description>
<name>itemValue</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Value to be displayed as part of the 'input' tags with type 'checkbox'</description>
<description>Value to be displayed as part of the 'input' tags with type
'checkbox'</description>
<name>itemLabel</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Delimiter to use between each 'input' tag with type 'checkbox'. There is no delimiter by default.</description>
<description>Delimiter to use between each 'input' tag with type 'checkbox'.
There is no delimiter by default.</description>
<name>delimiter</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Specifies the HTML element that is used to enclose each 'input' tag with type 'checkbox'. Defaults to 'span'.</description>
<description>Specifies the HTML element that is used to enclose each 'input'
tag with type 'checkbox'. Defaults to 'span'.</description>
<name>element</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -1958,7 +2005,8 @@ @@ -1958,7 +2005,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Equivalent to "class" - HTML Optional Attribute. Used when the bound field has errors.</description>
<description>Equivalent to "class" - HTML Optional Attribute.
Used when the bound field has errors.</description>
<name>cssErrorClass</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -1994,7 +2042,8 @@ @@ -1994,7 +2042,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.</description>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true'
will disable the HTML element.</description>
<name>disabled</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -2102,7 +2151,8 @@ @@ -2102,7 +2151,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true' will make the HTML element readonly.</description>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true'
will make the HTML element readonly.</description>
<name>readonly</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -2138,7 +2188,8 @@ @@ -2138,7 +2188,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Delimiter for displaying multiple error messages. Defaults to the br tag.</description>
<description>Delimiter for displaying multiple error messages.
Defaults to the HTML br tag.</description>
<name>delimiter</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -2284,7 +2335,8 @@ @@ -2284,7 +2335,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Equivalent to "class" - HTML Optional Attribute. Used only when errors are present.</description>
<description>Equivalent to "class" - HTML Optional Attribute.
Used only when errors are present.</description>
<name>cssErrorClass</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -2406,7 +2458,8 @@ @@ -2406,7 +2458,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.</description>
<description>HTML Optional Attribute. Setting the value of this attribute to 'true'
will disable the HTML element.</description>
<name>disabled</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>

137
spring-webmvc/src/main/resources/META-INF/spring.tld

@ -10,16 +10,14 @@ @@ -10,16 +10,14 @@
<uri>http://www.springframework.org/tags</uri>
<tag>
<description>
Sets default HTML escape value for the current page.
Overrides a "defaultHtmlEscape" context-param in web.xml, if any.
</description>
<description>Sets default HTML escape value for the current page.
Overrides a "defaultHtmlEscape" context-param in web.xml, if any.</description>
<name>htmlEscape</name>
<tag-class>org.springframework.web.servlet.tags.HtmlEscapeTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<description>Set the default value for HTML escaping, to be put
into the current PageContext.</description>
into the current PageContext.</description>
<name>defaultHtmlEscape</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
@ -27,11 +25,9 @@ @@ -27,11 +25,9 @@
</tag>
<tag>
<description>
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).
</description>
<description>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).</description>
<name>escapeBody</name>
<tag-class>org.springframework.web.servlet.tags.EscapeBodyTag</tag-class>
<body-content>JSP</body-content>
@ -44,7 +40,7 @@ @@ -44,7 +40,7 @@
</attribute>
<attribute>
<description>Set JavaScript escaping for this tag, as boolean value.
Default is false.</description>
Default is 'false'.</description>
<name>javaScriptEscape</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -52,22 +48,19 @@ @@ -52,22 +48,19 @@
</tag>
<tag>
<description>
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).
</description>
<description>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).</description>
<name>message</name>
<tag-class>org.springframework.web.servlet.tags.MessageTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<description>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.</description>
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.</description>
<name>message</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -80,11 +73,10 @@ @@ -80,11 +73,10 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>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). You can additionally use nested spring:argument
tags.</description>
<description>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).
You can additionally use nested spring:argument tags.</description>
<name>arguments</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -128,7 +120,8 @@ @@ -128,7 +120,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Set JavaScript escaping for this tag, as boolean value. Default is false.</description>
<description>Set JavaScript escaping for this tag, as boolean value.
Default is 'false'.</description>
<name>javaScriptEscape</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -136,11 +129,9 @@ @@ -136,11 +129,9 @@
</tag>
<tag>
<description>
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).
</description>
<description>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).</description>
<name>theme</name>
<tag-class>org.springframework.web.servlet.tags.ThemeTag</tag-class>
<body-content>JSP</body-content>
@ -158,11 +149,10 @@ @@ -158,11 +149,10 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>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). You can additionally use nested spring:argument
tags.</description>
<description>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).
You can additionally use nested spring:argument tags.</description>
<name>arguments</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -206,7 +196,8 @@ @@ -206,7 +196,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Set JavaScript escaping for this tag, as boolean value. Default is false.</description>
<description>Set JavaScript escaping for this tag, as boolean value.
Default is 'false'.</description>
<name>javaScriptEscape</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -214,9 +205,8 @@ @@ -214,9 +205,8 @@
</tag>
<tag>
<description>Argument tag based on the JSTL fmt:param tag. The purpose is to
support arguments inside the spring:message and spring:theme
tags.</description>
<description>Argument tag based on the JSTL fmt:param tag. The purpose is to
support arguments inside the spring:message and spring:theme tags.</description>
<name>argument</name>
<tag-class>org.springframework.web.servlet.tags.ArgumentTag</tag-class>
<body-content>JSP</body-content>
@ -230,11 +220,9 @@ @@ -230,11 +220,9 @@
</tag>
<tag>
<description>
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).
</description>
<description>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).</description>
<name>hasBindErrors</name>
<tag-class>org.springframework.web.servlet.tags.BindErrorsTag</tag-class>
<body-content>JSP</body-content>
@ -260,9 +248,7 @@ @@ -260,9 +248,7 @@
</tag>
<tag>
<description>
Sets a nested path to be used by the bind tag's path.
</description>
<description>Sets a nested path to be used by the bind tag's path.</description>
<name>nestedPath</name>
<tag-class>org.springframework.web.servlet.tags.NestedPathTag</tag-class>
<body-content>JSP</body-content>
@ -281,11 +267,9 @@ @@ -281,11 +267,9 @@
</tag>
<tag>
<description>
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).
</description>
<description>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).</description>
<name>bind</name>
<tag-class>org.springframework.web.servlet.tags.BindTag</tag-class>
<body-content>JSP</body-content>
@ -297,13 +281,14 @@ @@ -297,13 +281,14 @@
<description>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</description>
specifically for this bean or bean property.</description>
<name>path</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Set whether to ignore a nested path, if any. Default is to not ignore.</description>
<description>Set whether to ignore a nested path, if any.
Default is to not ignore.</description>
<name>ignoreNestedPath</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -318,12 +303,10 @@ @@ -318,12 +303,10 @@
</tag>
<tag>
<description>
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).
</description>
<description>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).</description>
<name>transform</name>
<tag-class>org.springframework.web.servlet.tags.TransformTag</tag-class>
<body-content>JSP</body-content>
@ -361,22 +344,22 @@ @@ -361,22 +344,22 @@
</tag>
<tag>
<description>URL tag based on the JSTL c:url tag. This variant is fully
backwards compatible with the standard tag. Enhancements include support
<description>URL tag based on the JSTL c:url tag. This variant is fully
backwards compatible with the standard tag. Enhancements include support
for URL template parameters.</description>
<name>url</name>
<tag-class>org.springframework.web.servlet.tags.UrlTag</tag-class>
<body-content>JSP</body-content>
<attribute>
<description>The URL to build. This value can include template place holders
that are replaced with the URL encoded value of the named parameter. Parameters
<description>The URL to build. This value can include template place holders
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.</description>
<name>value</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Specifies a remote application context path. The default is the
<description>Specifies a remote application context path. The default is the
current application context path.</description>
<name>context</name>
<required>false</required>
@ -389,8 +372,8 @@ @@ -389,8 +372,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>The scope for the var. 'application', 'session', 'request' and
'page' scopes are supported. Defaults to page scope. This attribute has no
<description>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.</description>
<name>scope</name>
<required>false</required>
@ -405,7 +388,7 @@ @@ -405,7 +388,7 @@
</attribute>
<attribute>
<description>Set JavaScript escaping for this tag, as a boolean value.
Default is false.</description>
Default is 'false'.</description>
<name>javaScriptEscape</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@ -413,7 +396,7 @@ @@ -413,7 +396,7 @@
</tag>
<tag>
<description>Parameter tag based on the JSTL c:param tag. The sole purpose is to
<description>Parameter tag based on the JSTL c:param tag. The sole purpose is to
support params inside the spring:url tag.</description>
<name>param</name>
<tag-class>org.springframework.web.servlet.tags.ParamTag</tag-class>
@ -433,7 +416,8 @@ @@ -433,7 +416,8 @@
</tag>
<tag>
<description>Evaluates a Spring expression (SpEL) and either prints the result or assigns it to a variable.</description>
<description>Evaluates a Spring expression (SpEL) and either prints the result
or assigns it to a variable.</description>
<name>eval</name>
<tag-class>org.springframework.web.servlet.tags.EvalTag</tag-class>
<body-content>JSP</body-content>
@ -450,8 +434,8 @@ @@ -450,8 +434,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>The scope for the var. 'application', 'session', 'request' and
'page' scopes are supported. Defaults to page scope. This attribute has no
<description>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.</description>
<name>scope</name>
<required>false</required>
@ -465,7 +449,8 @@ @@ -465,7 +449,8 @@
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description>Set JavaScript escaping for this tag, as a boolean value. Default is false.</description>
<description>Set JavaScript escaping for this tag, as a boolean value.
Default is 'false'.</description>
<name>javaScriptEscape</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>

115
src/asciidoc/appx-spring-form-tld.adoc

@ -33,6 +33,41 @@ This appendix describes the `spring-form.tld` tag library. @@ -33,6 +33,41 @@ This appendix describes the `spring-form.tld` tag library.
[[spring-form.tld.button]]
== The button tag
Renders a form field label in an HTML 'button' tag.
[[spring-form.tld.button.table]]
[cols="1,1,1,3"]
.Attributes
|===
| Attribute| Required?| Runtime Expression?| Description
| disabled
| false
| true
| HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.
| id
| false
| true
| HTML Standard Attribute
| name
| false
| true
| The name attribute for the HTML button tag
| value
| false
| true
| The name attribute for the HTML button tag
|===
[[spring-form.tld.checkbox]]
== The checkbox tag
@ -72,8 +107,7 @@ Renders an HTML 'input' tag with type 'checkbox'. @@ -72,8 +107,7 @@ Renders an HTML 'input' tag with type 'checkbox'.
| disabled
| false
| true
| HTML Optional Attribute. Setting the value of this attribute to 'true' (without the
quotes) will disable the HTML element.
| HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.
| htmlEscape
| false
@ -218,8 +252,7 @@ Renders multiple HTML 'input' tags with type 'checkbox'. @@ -218,8 +252,7 @@ Renders multiple HTML 'input' tags with type 'checkbox'.
| delimiter
| false
| true
| Delimiter to use between each 'input' tag with type 'checkbox'. There is no delimiter
by default.
| Delimiter to use between each 'input' tag with type 'checkbox'. There is no delimiter by default.
| dir
| false
@ -229,14 +262,12 @@ Renders multiple HTML 'input' tags with type 'checkbox'. @@ -229,14 +262,12 @@ Renders multiple HTML 'input' tags with type 'checkbox'.
| disabled
| false
| true
| HTML Optional Attribute. Setting the value of this attribute to 'true' (without the
quotes) will disable the HTML element.
| HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.
| element
| false
| true
| Specifies the HTML element that is used to enclose each 'input' tag with type
'checkbox'. Defaults to 'span'.
| Specifies the HTML element that is used to enclose each 'input' tag with type 'checkbox'. Defaults to 'span'.
| htmlEscape
| false
@ -256,14 +287,12 @@ Renders multiple HTML 'input' tags with type 'checkbox'. @@ -256,14 +287,12 @@ Renders multiple HTML 'input' tags with type 'checkbox'.
| items
| true
| true
| The Collection, Map or array of objects used to generate the 'input' tags with type
'checkbox'
| The Collection, Map or array of objects used to generate the 'input' tags with type 'checkbox'
| itemValue
| false
| true
| Name of the property mapped to 'value' attribute of the 'input' tags with type
'checkbox'
| Name of the property mapped to 'value' attribute of the 'input' tags with type 'checkbox'
| lang
| false
@ -490,8 +519,8 @@ Renders an HTML 'form' tag and exposes a binding path to inner tags for binding. @@ -490,8 +519,8 @@ Renders an HTML 'form' tag and exposes a binding path to inner tags for binding.
| true
| 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.
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.
| action
| false
@ -501,8 +530,7 @@ Renders an HTML 'form' tag and exposes a binding path to inner tags for binding. @@ -501,8 +530,7 @@ Renders an HTML 'form' tag and exposes a binding path to inner tags for binding.
| commandName
| false
| true
| Name of the model attribute under which the form object is exposed. Defaults to
'command'.
| Name of the model attribute under which the form object is exposed. Defaults to 'command'.
| cssClass
| false
@ -544,11 +572,15 @@ Renders an HTML 'form' tag and exposes a binding path to inner tags for binding. @@ -544,11 +572,15 @@ Renders an HTML 'form' tag and exposes a binding path to inner tags for binding.
| true
| HTML Optional Attribute
| methodParam
| false
| true
| The parameter name used for HTTP methods other then GET and POST. Default is '_method'.
| modelAttribute
| false
| true
| Name of the model attribute under which the form object is exposed. Defaults to
'command'.
| Name of the model attribute under which the form object is exposed. Defaults to 'command'.
| name
| false
@ -615,6 +647,11 @@ Renders an HTML 'form' tag and exposes a binding path to inner tags for binding. @@ -615,6 +647,11 @@ Renders an HTML 'form' tag and exposes a binding path to inner tags for binding.
| true
| HTML Event Attribute
| servletRelativeAction
| false
| true
| Action reference to be appended to the current servlet path
| target
| false
| true
@ -708,8 +745,7 @@ Renders an HTML 'input' tag with type 'text' using the bound value. @@ -708,8 +745,7 @@ Renders an HTML 'input' tag with type 'text' using the bound value.
| disabled
| false
| true
| HTML Optional Attribute. Setting the value of this attribute to 'true' (without the
quotes) will disable the HTML element.
| HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.
| htmlEscape
| false
@ -809,8 +845,7 @@ Renders an HTML 'input' tag with type 'text' using the bound value. @@ -809,8 +845,7 @@ Renders an HTML 'input' tag with type 'text' using the bound value.
| readonly
| false
| true
| HTML Optional Attribute. Setting the value of this attribute to 'true' (without the
quotes) will make the HTML element readonly.
| HTML Optional Attribute. Setting the value of this attribute to 'true' will make the HTML element readonly.
| size
| false
@ -985,8 +1020,7 @@ Renders a single HTML 'option'. Sets 'selected' as appropriate based on bound va @@ -985,8 +1020,7 @@ Renders a single HTML 'option'. Sets 'selected' as appropriate based on bound va
| disabled
| false
| true
| HTML Optional Attribute. Setting the value of this attribute to 'true' (without the
quotes) will disable the HTML element.
| HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.
| htmlEscape
| false
@ -1111,8 +1145,7 @@ Renders a list of HTML 'option' tags. Sets 'selected' as appropriate based on bo @@ -1111,8 +1145,7 @@ Renders a list of HTML 'option' tags. Sets 'selected' as appropriate based on bo
| disabled
| false
| true
| HTML Optional Attribute. Setting the value of this attribute to 'true' (without the
quotes) will disable the HTML element.
| HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.
| htmlEscape
| false
@ -1257,8 +1290,7 @@ Renders an HTML 'input' tag with type 'password' using the bound value. @@ -1257,8 +1290,7 @@ Renders an HTML 'input' tag with type 'password' using the bound value.
| disabled
| false
| true
| HTML Optional Attribute. Setting the value of this attribute to 'true' (without the
quotes) will disable the HTML element.
| HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.
| htmlEscape
| false
@ -1358,8 +1390,7 @@ Renders an HTML 'input' tag with type 'password' using the bound value. @@ -1358,8 +1390,7 @@ Renders an HTML 'input' tag with type 'password' using the bound value.
| readonly
| false
| true
| HTML Optional Attribute. Setting the value of this attribute to 'true' (without the
quotes) will make the HTML element readonly.
| HTML Optional Attribute. Setting the value of this attribute to 'true' will make the HTML element readonly.
| showPassword
| false
@ -1424,8 +1455,7 @@ Renders an HTML 'input' tag with type 'radio'. @@ -1424,8 +1455,7 @@ Renders an HTML 'input' tag with type 'radio'.
| disabled
| false
| true
| HTML Optional Attribute. Setting the value of this attribute to 'true' (without the
quotes) will disable the HTML element.
| HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.
| htmlEscape
| false
@ -1570,8 +1600,7 @@ Renders multiple HTML 'input' tags with type 'radio'. @@ -1570,8 +1600,7 @@ Renders multiple HTML 'input' tags with type 'radio'.
| delimiter
| false
| true
| Delimiter to use between each 'input' tag with type 'radio'. There is no delimiter by
default.
| Delimiter to use between each 'input' tag with type 'radio'. There is no delimiter by default.
| dir
| false
@ -1581,14 +1610,12 @@ Renders multiple HTML 'input' tags with type 'radio'. @@ -1581,14 +1610,12 @@ Renders multiple HTML 'input' tags with type 'radio'.
| disabled
| false
| true
| HTML Optional Attribute. Setting the value of this attribute to 'true' (without the
quotes) will disable the HTML element.
| HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.
| element
| false
| true
| Specifies the HTML element that is used to enclose each 'input' tag with type 'radio'.
Defaults to 'span'.
| Specifies the HTML element that is used to enclose each 'input' tag with type 'radio'. Defaults to 'span'.
| htmlEscape
| false
@ -1608,8 +1635,7 @@ Renders multiple HTML 'input' tags with type 'radio'. @@ -1608,8 +1635,7 @@ Renders multiple HTML 'input' tags with type 'radio'.
| items
| true
| true
| The Collection, Map or array of objects used to generate the 'input' tags with type
'radio'
| The Collection, Map or array of objects used to generate the 'input' tags with type 'radio'
| itemValue
| false
@ -1744,8 +1770,7 @@ Renders an HTML 'select' element. Supports databinding to the selected option. @@ -1744,8 +1770,7 @@ Renders an HTML 'select' element. Supports databinding to the selected option.
| disabled
| false
| true
| HTML Optional Attribute. Setting the value of this attribute to 'true' (without the
quotes) will disable the HTML element.
| HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.
| htmlEscape
| false
@ -1915,8 +1940,7 @@ Renders an HTML 'textarea'. @@ -1915,8 +1940,7 @@ Renders an HTML 'textarea'.
| disabled
| false
| true
| HTML Optional Attribute. Setting the value of this attribute to 'true' (without the
quotes) will disable the HTML element.
| HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.
| htmlEscape
| false
@ -2011,8 +2035,7 @@ Renders an HTML 'textarea'. @@ -2011,8 +2035,7 @@ Renders an HTML 'textarea'.
| readonly
| false
| true
| HTML Optional Attribute. Setting the value of this attribute to 'true' (without the
quotes) will make the HTML element readonly.
| HTML Optional Attribute. Setting the value of this attribute to 'true' will make the HTML element readonly.
| rows
| false

138
src/asciidoc/appx-spring-tld.adoc

@ -29,6 +29,26 @@ This appendix describes the `spring.tld` tag library. @@ -29,6 +29,26 @@ This appendix describes the `spring.tld` tag library.
[[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
@ -92,6 +112,51 @@ HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml). @@ -92,6 +112,51 @@ HtmlEscapeTag or a "defaultHtmlEscape" context-param in web.xml).
[[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
@ -238,6 +303,31 @@ Sets a nested path to be used by the bind tag's path. @@ -238,6 +303,31 @@ Sets a nested path to be used by the bind tag's path.
[[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
@ -365,7 +455,7 @@ escaping. Modeled after the JSTL c:url tag with backwards compatibility in mind. @@ -365,7 +455,7 @@ escaping. Modeled after the JSTL c:url tag with backwards compatibility in mind.
|===
| Attribute| Required?| Runtime Expression?| Description
| url
| value
| true
| true
| The URL to build. This value can include template {placeholders} that are replaced
@ -402,49 +492,3 @@ escaping. Modeled after the JSTL c:url tag with backwards compatibility in mind. @@ -402,49 +492,3 @@ escaping. Modeled after the JSTL c:url tag with backwards compatibility in mind.
| true
| Set JavaScript escaping for this tag, as a 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.
| 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.
| 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.
|===

Loading…
Cancel
Save