You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Darren Spurgeon <ka...@yahoo.com> on 2002/11/01 17:23:49 UTC

Validation for Map-backed Forms

Hi.

I'm currently using Map-backed forms (as described in
the "Building Controller Components" section of the
Struts user guide) to manage forms that are
dynamically created from a database, where the number
of fields, their names, their types are not
necessarily known at deployment (so no
DynaActionForm).  I'm wondering if it's still possible
to use the (Commons) Validator to validate the form
fields.

I understand that the normal usage requires form
elements in the validator-rules file to match that of
a form-bean element in the Struts config file.  That's
not really possible in my case because I don't know
ahead of time what the fields will be (by name or
type, in number, etc.).  Would it be possible to
programmatically create the formset and form elements
Validator requires but still use them in conjunction
with the validations file (where the validator
elements are stored), which would be commonly shared
between forms?  Any pointers on how I can accomplish
this?  Or, is there a better way to handle dynamic
(i.e., on-the-fly or real-time) form creation with
Struts?

Thanks.

-Darren


__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>