I am having problems with submitting form data in spring. <spring:bind>
seems to be a part of the solution. See my full problem here.
The documentation of BindTag found here is not clear to me. Why is <spring:bind>
needed in some cases to submit data, while it is not needed in most cases?
What are the typical cases where the <spring:bind>
must be used in order for a form to function properly?
The spring:bind tag provides you with support for evaluation of the status of a certain bean or bean property.
In the case that the coilovers are fully threaded and offer independent ride height and spring pre-load, we recommend making sure that there isn't any more than 5mm of preload set onto the spring. Too much pre-load can cause tension on the bearing and can cause spring bind.
Data binding is useful for allowing user input to be dynamically bound to the domain model of an application (or whatever objects you use to process user input). Spring provides the so-called DataBinder to do exactly that.
You will find the tag <spring:bind>
useful when you want to parse multiple objects from an input form. Here's a modified example from the Spring's doc (http://docs.spring.io/spring/docs/1.2.6/taglib/tag/BindTag.html):
<form method="post">
## 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}"/>">
</spring:bind>
<spring:bind path="address.street">
Name: <input
type="text"
value="<c:out value="${status.value}"/>"
name="<c:out value="${status.expression}"/>">
</spring:bind>
<input type="submit">
</form>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With