Dynamic Form and validators
I have a dynamic based on a configuration file (so I don´t know exactly what form I will produce).
I´d like to validate this form using the Spring Way of Validate (validator property)... but in my case what I need is to validate a Map object that I get from request.getParameterMap().
Is it possible? How to do it?
ps: As I have a dynamic form, I can´t bind the form data to a object.
Regards,
Alexandre Porcelli
The BaseCommandController and all extending Controllers (AbstractCommandController, AbstractFormController etc.) are the base for all controllers that populate JavaBeans based on request parameters and validate the content using Validators.
I think there is no way you can configure the Validators for your App. in the ApplicationContext definition, not do automatic bnding and still use the Validators outside of this hierarchy.
There is a subproject in the Acegi Security CVS though that does exactly does: it lets you reuse your configured Validators in other Tiers and classes in a programmatic way. I am using it with great pleasure! |