Upayavira wrote:
Sylvain,
I happened to be doing something similar at the time, so I looked at the
code. Looking at:
http://svn.apache.org/repos/asf/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/validation/impl/JavaScriptValidator.java
Method validate(Widget widget), I notice:
if (result instanceof Boolean) {
return ((Boolean)result).booleanValue();
}
if (result instanceof ValidationError) {
// Set the validation error on the widget
((ValidationErrorAware)widget).setValidationError((ValidationError)result);
}
if (result instanceof String) {
// Set a non-i18n error on the current widget
((ValidationErrorAware)widget).setValidationError(new
ValidationError((String)result, false));
return false;
}
The middle one of these if statements doesn't return anything, and will
thus throw a RuntimeException at the end of the method. Is this correct?
Ooops! No, this is definitely not correct!
I fixed it. Thanks!
Sylvain
--
Sylvain Wallez Anyware Technologies
http://people.apache.org/~sylvain http://www.anyware-tech.com
Apache Software Foundation Member Research & Technology Director
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]