Allow more ways to attach the command object errors to a FormViewElement
Description
Currently only the command attribute (model attribute name) is supported and a BindingResult is expected to be present. This is cumbersome when rendering forms purely from code.
Two additional options should be made available:
set the command object on the form
this will attempt to resolve the actual BindingResult on the model for that object, if none found, errors will not be bound
set the Errors object on the form
will use that errors instance directly for error binding
Currently only the command attribute (model attribute name) is supported and a
BindingResult
is expected to be present. This is cumbersome when rendering forms purely from code.Two additional options should be made available:
set the command object on the form
this will attempt to resolve the actual
BindingResult
on the model for that object, if none found, errors will not be boundset the
Errors
object on the formwill use that errors instance directly for error binding