From the Spring API, I realized that @InitBinder used to initialize some binding rules.
In the loop example, why do we have setdisallowed("id") ? when the id is not displayed on the form?
@InitBinder public void setAllowedFields(WebDataBinder dataBinder) { dataBinder.setDisallowedFields("id"); }
The id field does not appear on the web page, why do we use the above code?
can we say something:
@InitBinder public void setAllowedFields(WebDataBinder dataBinder) { dataBinder.setDisallowedFields("FirstName"); }
according to the above code, the field of the first name of the ownerβs object will not be set if the user enters the form? It is right?
source link
spring spring-mvc
javanoob
source share