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.

Derek

Jens v.P. wrote:
Hello,

I'm wondering if anybody has already extended the validator framework
- to use it in the business layer instead of the controller layer
- supporting dynamically loaded/created forms

Validating user input is no special struts or web application requirement. In my case, all applications are web applications, but I've got different "applications" based on the same business data (the layout differs). Also, I've got a lot of questionnaires which are going to be implemented as forms. Thus I want to define the validation together with the questionnaire aka form.

The validator framework is part of the controller. IMHO in case of questionnaires this is the "wrong" tier - a questionnaire is a business object, and validating the user input must be defined there. Of course, the same validation rules also apply for the validation of the form input. In other words, the questionnaire is the model for the form - the form is the view.

So, what I'm looking for is a way to use the validator framework for defining my (business) questionnaires. The questionnaire then "works" as a model providing the validation rules to the view /or controller.

I've read (in Chuck Cavaness' book on struts) how to use the validator framework outside struts - but this is not really the point: I want to use it outside and inside at the same time - and (to make it a little bit more interesting) I need also some extensions, e.g. defining question blocks, "super-properties", filters.

I've found some questions here before on that or similar topics, so maybe the problem was solved before? Otherwise I'll try to solve this problem - in this case some hints may help a lot :)

Jens


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--
----------------------------------------------------------------------
Derek Chen-Becker
Senior Network Engineer
CPI Corp, Inc.
1706 Washington Ave
St. Louis, MO 63103
Phone: 314-231-1575 x6014
Fax:   314-613-6724
[EMAIL PROTECTED]
PGP Key available from public key servers
Fingerprint: 1C34 D81E D8A0 641D 6C8C  E952 3B15 693F 9184 BC58
----------------------------------------------------------------------


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to