ivelin 2002/07/15 06:38:21 Modified: src/java/org/apache/cocoon/components/xmlform Form.java Log: added addViolations Revision Changes Path 1.5 +25 -4 xml-cocoon2/src/java/org/apache/cocoon/components/xmlform/Form.java Index: Form.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/xmlform/Form.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Form.java 4 Jul 2002 20:57:47 -0000 1.4 +++ Form.java 15 Jul 2002 13:38:20 -0000 1.5 @@ -168,6 +168,27 @@ { return violations_; } + + + /** + * + * This method allows custom validations to be added + * after population and after a call to validate + * (either automatic or explicit). + * Usually used from within the perform method of + * a concrete XMLFormAction. + * + * @param newViolations + * + */ + public void addViolations( List newViolations ) + { + + if (violations_ == null) violations_.addAll( newViolations ); + else violations_ = newViolations; + + } + public SortedSet getViolationsAsSortedSet() {
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]