Let's discuss on the following example:
<spring:bind path="user.userName"> <input type="text" name="${status.expression}" value="${status.value}"/> <span class="fieldError">${status.errorMessage}</span> </spring:bind>
When this view snippet gets rendered, what do ${status.expression} and ${status.value} get evaluated to? Where do these values come from?
General information. The spring:bind tag provides you with support for evaluation of the status of a certain bean or bean property.
In Spring MVC, the model works a container that contains the data of the application. Here, a data can be in any form such as objects, strings, information from the database, etc. It is required to place the Model interface in the controller part of the application.
@PanadolChong accomodate Spring MVC is still used in some legacy applications, and Spring boot does majority of the configurations under-hood so to have a better understanding of how things work internally, Spring MVC might help.
See this link for an explanation of what the status variables mean.
The status object is evaluated when the binding is done.
Also have in mind that Spring 2.0 introduced new form tags, which are probable better suited for your needs.
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