| spring:bind (since 1.0) | 
				
					| General information | 
				
					| The spring:bindtag provides you with support for evaluation
						of the status of a certain bean or bean property. The status of a bean includes
						the value of the actual bean or bean property you're evaluating as well as 
						possibily available errors and the expression to use in forms in order for
						the databinding functionality to be able to bind the properties again when
						submitting for instance a form. | 
				
					| Attributes | 
				
					
				
				
					| The path to the bean or bean property to bind status information
						for. For instance account.name,company.address.zipCodeor justemployee. The status object will exported to the 
						page scope, specifically for this bean or bean property | 
				
					| required: yes | 
				
					| el-support: yes | 
				
					
				
				
					| Set whether to ignore a nested path, if any. Default is to not ignore. | 
				
					| required: no | 
				
					| el-support: no | 
				
					
				
				
					| Set HTML escaping for this tag, as boolean value.
						Overrides the default HTML escaping setting for the current page. | 
				
					| required: no | 
				
					| el-support: yes | 
				
					| Variables | 
				
					
				
				
					| The status object, giving you information about errors, property values
						and expressions to use when rendering e.g. form fields | 
				
					| type: org.springframework.web.servlet.support.BindStatus | 
				
					| status.expression: the expression that was used to retrieve the bean or property | 
				
					| status.value: the actual value of the bean or property (transformed using registered
						PropertyEditors) | 
				
					| status.errorMessages: an array of error messages, resulting from validation | 
				
					| Also have a look at | 
				
					| the spring:transformtag,
					to see how to also transform reference data values using property editors | 
				
					| the spring:messagetag,
					to see how you can internationalize your error messages | 
				
					| the ServletRequestDataBinderand theregisterCustomEditormethod inDataBinderto see how the property editing works | 
				
					| the BaseCommandControllerfor more information about command objects (your data objects) and how they works | 
				
					| the spring:nestedPathtag,
						which allows you to set a nested bean or bean property path | 
				
					| A possible usecase | 
				
					| Consider the following: 
							To display a form rendering all properties (that - in case of validation failures -
						forward to the formView and fills in all properties that were already set) and also
						displaying errors:SimpleFormController that controls CompanyobjectsCompanyhas anameand anaddressproperty, whereaddressis of typeAddressAddresshas three properties, i.e.street,zipCodeandcityin your formBackObject you have already instantiated the empty
								Companyobject containing an emptyAddressobject 
<form method="post">
    ## first bind on the object itself to display global errors - if available
    <spring:bind path="company">
        <c:forEach items="${status.errorMessages}" var="error">
        Error code: <c:out value="${error}"/><br>
        </c:forEach>
    </spring:bind>
    
    ## if you need to display all errors (both global and all field errors,
    ## use wildcard (*) in place of the property name
    <spring:bind path="company.*">
        <c:forEach items="${status.errorMessages}" var="error">
        Error code: <c:out value="${error}"/><br>
        </c:forEach>
    </spring:bind>
	
    ## now bind on the name of the company
    <spring:bind path="company.name">
        ## render a form field, containing the value and the expression
        Name: <input 
            type="text" 
            value="<c:out value="${status.value}"/>"
            name="<c:out value="${status.expression}"/>">
            ## if there are error codes, display them!
            <c:if test="${status.error}">
                Error codes:
                <c:forEach items="${status.errorMessages}" var="error">
                    <c:out value="${error}"/>
                </c:forEach>
            </c:if>
    </spring:bind>
	
    <spring:bind path="company.address.street">
        Name: <input 
            type="text"
            value="<c:out value="${status.value}"/>"
            name="<c:out value="${status.expression}"/>">
            <c:if test="${status.error}">
                Error codes:
                <c:forEach items="${status.errorMessages}" var="error">
                    <c:out value="${error}"/>
                </c:forEach>
            </c:if>
    </spring:bind>
	
    ## same thing for zipCode
	
    <input type="submit">
</form>
 |