Open odrotbohm opened 6 years ago
Thank you for this hint and I get the point. Here are some suggestions:
What do you think? (My favorite is "FormModel")
FormModel
sounds about right. I just wonder why one would've to lookup a dedicated object from the form in the first place and couldn't rather put that into the model and let the template integration to the lookup of that internal object.
Ok, I refactored it to FormModel. The FormResult now must be passed directly to the template.
Example:
FormResult formResult = form.run(...); model.addAttribute("form", formResult);
To a Spring MVC developer this looks odd as the term view is already taken for the tempalte that get's rendered eventually. Also adding a view to a model doesn't sound right from a plain MVC point of view.