|
From: <se...@eh...> - 2004-05-17 07:22:56
|
Hello, Much along the lines of multiple View Resolvers, I'd like to ask the developers if they believe allowing multiple Validators per Handler is a good idea. I've run into this situation a few times, and it seems like a good idea. With the addition of new validators that automatically determine the validation rules (commons-validator, for example), there aren't any explicit validator objects written. A handler currently takes one validator. I often need to code some specific, hard to specify via attributes validation rules that go above and beyond what simple declarative validation rules can specify. I'd like the specific validation rules to run along with the commons-validator derived rules. The solution for multiple View Resolvers was to look into the ApplicationContext and find all View Resolvers. There was no explicit ViewResolverChain object. With Handlers, the API has a setValidator. Not wanting to break the API, a suggestion would be to add a setValidators(List validators) method to Handler. This would avoid creating a ValidatorChain object and would keep in the spirit of the View Resolvers solution. Any ideas on this? I would be more than happy to provide the patch for this. Of course, if people think the best way to solve this is to create some sort of Validator Chain object and leave the API for Handler alone, I would create the patch for that as well. Your feedback is much appreciated. I look forward to helping out! Thanks, Seth ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. |