I don't think a switch on the <strutsvalidationxml> subtask is needed, but maybe to keep processing speed as fast as possible perhaps there should be something that indicates struts="true" or not. Again, as long as the current Struts stuff stays working as-is, I'm fine with changes to make this more generalized.
Erik
On Tuesday, November 25, 2003, at 10:23 AM, Mark Lybarger wrote:
I was able to get the strutsvalidatorxml to work with commons-validator by making the following change in the StrutsValidatorTagsHandler class. Probably a "better" way to do this is to add a parameter to the strutsvalidationxml task such as :
<strutsvalidationxml commons-validator="true"/>
Then checking that property (if possible) in this method.
public void forAllForms(String template, Properties attributes) throws XDocletException
{
Collection classes = getAllClasses();
for (ClassIterator i = XCollections.classIterator(classes); i.hasNext(); ) {
XClass currentClass = i.next();
setCurrentClass(currentClass);
if (DocletSupport.isDocletGenerated(getCurrentClass()) || (getCurrentClass().isAbstract())) {
continue;
}
//if (TypeTagsHandler.isOfType(currentClass, "org.apache.struts.validator.ValidatorForm", TypeTagsHandler.TYPE_HIERARCHY)) {
generate(template);
//}
}
}
my validator.xml from this has something like:
<field property="currentAddress1" depends="required,max-length">
<arg0 key="com.MyClass.currentAddress1"/> <var> <var-name>max-length</var-name> <var-value>32</var-value> </var> </field>
i'm not sure if the arg0 will effect anything, i'll have to do some testing...
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.532 / Virus Database: 326 - Release Date: 10/27/2003
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
