Hey, I could really be missing the point and I haven't had time to delve into the struts/validator code. To me, it sounds like you might want to look into dynamically building a validator action (or whatever object is defined in the validation.xml) and map that to your form. If your jsp then has the client-side validator tags, you will get client-side validation. You will also get server-side validation if you have validation turned on. I have not looked into doing this, but with my limited knowledge of struts, it seems feasible. To summarize, I suggest that you dynamically build what normally would be defined in validation.xml in struts1.1.
Chuck -----Original Message----- From: Jens v.P. [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 9:55 AM To: Struts Users Mailing List Subject: Re: Has anybody extended the validator framework? Hi, Am Mittwoch, 23.07.03 um 16:24 Uhr schrieb Derek Chen-Becker: > Since the questionnaire is the model for the form, couldn't you just > encapsulate a real questionnaire business object within an ActionForm? > It adds a layer, but since ActionForms are objects and not interfaces > I don't see an easier way than delegation. > I'm not sure I understand that. Do you mean to use the validator "outside" struts (in the business layer) and delegate all validations in the form to the business object? Like this: MyForm extends ActionForm { .. public ActionErrors validate(..) { ... Questionnaire->validate(); ... } } That was my first idea, too. But in this case I don't know how to use client side validation (and that's a really nice feature). And it still doesn't solve the problem of dynamically created questionnaires/forms. I'm thinking about a way to extend/modify the validator for supporting "runtime configuration". I hope that this is not too complicate - I guess that I only have to exchange the digester creation by a runtime configuration. Or by simply "extending" the digester for creating my own "business" classes, adding some features which I require, and add the ability to the business classes (or add a layer between with this ability) to generate the validator framework classes on the fly, based on the extended definition. Jens --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

