Update of /cvsroot/xdoclet/xdoclet/modules/apache/src/xdoclet/modules/apache/struts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21250/src/xdoclet/modules/apache/struts
Modified Files: StrutsDynaFormValidatorTagsHandler.java StrutsValidatorTagsHandler.java Log Message: Added the ability to override validation rules on fields. Index: StrutsDynaFormValidatorTagsHandler.java =================================================================== RCS file: /cvsroot/xdoclet/xdoclet/modules/apache/src/xdoclet/modules/apache/struts/StrutsDynaFormValidatorTagsHandler.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** StrutsDynaFormValidatorTagsHandler.java 27 Sep 2004 21:51:22 -0000 1.1 --- StrutsDynaFormValidatorTagsHandler.java 29 Nov 2004 01:20:30 -0000 1.2 *************** *** 58,62 **** /** ! * Gets the "name" attribute for the <form> element in the xml descriptor. * * @param attributes The content tag attributes. --- 58,62 ---- /** ! * Gets the "name" attribute for the <form> element in the xml descriptor. * * @param attributes The content tag attributes. Index: StrutsValidatorTagsHandler.java =================================================================== RCS file: /cvsroot/xdoclet/xdoclet/modules/apache/src/xdoclet/modules/apache/struts/StrutsValidatorTagsHandler.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** StrutsValidatorTagsHandler.java 27 Sep 2004 21:51:22 -0000 1.11 --- StrutsValidatorTagsHandler.java 29 Nov 2004 01:20:30 -0000 1.12 *************** *** 346,354 **** for (Iterator iterator = curFields.iterator(); iterator.hasNext(); ) { XMethod method = (XMethod) iterator.next(); ! if (method.getDoc().getTag("struts.validator") != null) { ! List params = method.getParameters(); ! String name = MethodTagsHandler.getPropertyNameFor(method); XParameter param = null; --- 346,359 ---- for (Iterator iterator = curFields.iterator(); iterator.hasNext(); ) { XMethod method = (XMethod) iterator.next(); + XTag tag = method.getDoc().getTag("struts.validator"); + String override = null; ! if (tag != null) { ! override = tag.getAttributeValue("override"); ! } ! if (tag != null) { ! List params = method.getParameters(); ! String name = method.getPropertyName(); XParameter param = null; *************** *** 383,387 **** --- 388,396 ---- fields.put(prefix + name, method); } + else if ((override != null) && (override.equals("true"))) { + fields.put(prefix + name, method); + } else { + boolean preDot = (prefix.length() > 0 && prefix.charAt(prefix.length() - 1) != '.'); ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel