cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist>
Subject Re: [cforms] Clear validation error on a widget?
Date Wed, 14 Apr 2004 19:45:18 GMT

On Apr 14, 2004, at 12:04 PM, Mark Lundquist wrote:

> I just added ScriptableWidget.jsFunction_clearValidationError(), and 
> that seems to fix my trouble.  <snip...>

Well, it _almost_ fixed it :-(.

But I was naïve about what I could expect from onValidate().  I clear 
the validation error, but I'm clearing it after the fact — the form has 
already decided that it needs to be redisplayed because of that 
validation error:

 From v2/Form.js:

     var finished = javaWidget.process(formContext);
     if (this.onValidate) {
     if (!finished || userErrors > 0) {
         cocoon.continuation = this.local_.webContinuation;
     return wk;

So there's nothing I can do in onValidate() that can prevent this loop 
from continuing, so the result is that I have to submit twice.

~ mark

View raw message