Mick Knutson wrote:
I am trying to figure out if there is a way to have the Validator
framwork verify that the form element names defined in the
validation.xml, are in synch with my ActionForms, but not jst at
runtime. Right now if there is a mismatch, then I get an error in the
form of an error, sometimes obscure, on the field that is mismatched.
So I would like to be able to enforce the validating of the
validation.xml forms at startup time if possible.
I solved a similar problem at build using two different methods on
several projects:
1) Generated validation.xml, torque schema, chunks of
DynaValidatorActionForm form-beans for struts-config.xml, parts of
application resources, java classes for marshalling within Actions (I
didn't always use this part, actually :/ and JSP chunks (form tiles)
from an over-arching XML configuration file. This doesn't do what you're
asking, but it does make sure that things are in sync, and was actually
kinda nice.
2) Used XML parser to check names of fields in validation.xml against
struts-config action "name" attributes linked against struts-config
form-bean defs, sort of like a 'diff' for various chunks of XML. This
also ran as an ant task, not on startup or anything, but I suppose it
could be adapted to that.
To me, this seems like a problem better solved during the build process
rather than deployment/startup.
Dave Newton
Technical Lead (MonkeyLips OmniGalgomon Project)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]