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]

