Open gabrielbauman opened 11 years ago
I've found that Spring inserts BindingResults instances for each @ModelAttribute into the model after the controller method runs.
The binding result including field values and validation errors can be found in the model with the key BindingResult.MODEL_KEY_PREFIX + objectName
.
For the above handleForm method, that would be "org.springframework.validation.BindingResult.employeeForm".
I'm working on a small Jade mixin library to make working with this easier.
Hi @gabrielbauman any luck with the mixin library?
I am working on something similar for our project.
/Martin
Hi there,
Spring does some nifty form backing object binding and validation when a controller has a method like this:
I'm trying to figure out how to hook into this mechanism from a Jade template. Immediate question: how should my form input tags be named for the above controller method?
Obviously spring-jade4j doesn't have a macro library like that offered by Spring's Freemarker, Velocity, and JSP template resolvers. It seems like one could be easily implemented using Jade mixins.