adcspring
Oct 11th, 2005, 11:00 AM
Our website contains various layouts for different sub-sites. For example, the main website will have layout "core" at www.domain.com but various sub-sites like www.domain.com/subsitea and www.domain.com/subsiteb will both share a different layout "subsite".
However, across the various sites we have, are forms. The form logic is for all intents and purposes the same. Yet in Spring I am forced to declare mappings from URLs to form views and form success views.
This is really inefficient for us. We'd much rather somehow programmatically configure formView and formSuccess (and also the validator) per request based on a model object property that we have in the request.
Can anyone tell me if it is possible to programmatically change form view and success view prior to a request?
I tried changing it in onBind but Spring therw an error that my SimpleFormController did not define formView and formSucess.
Thanks
However, across the various sites we have, are forms. The form logic is for all intents and purposes the same. Yet in Spring I am forced to declare mappings from URLs to form views and form success views.
This is really inefficient for us. We'd much rather somehow programmatically configure formView and formSuccess (and also the validator) per request based on a model object property that we have in the request.
Can anyone tell me if it is possible to programmatically change form view and success view prior to a request?
I tried changing it in onBind but Spring therw an error that my SimpleFormController did not define formView and formSucess.
Thanks