W3C home > Mailing lists > Public > www-forms@w3.org > May 2007

Re: question to implementors: handling of initial validation

From: John Boyer <boyerj@ca.ibm.com>
Date: Tue, 29 May 2007 20:33:20 -0700
To: Aaron Reed <aaronr@us.ibm.com>
Cc: www-forms@w3.org, www-forms-request@w3.org
Message-ID: <OFB10F8111.2331C828-ONCA2572EB.0012E49C-882572EB.001388A8@ca.ibm.com>
The XForms implementation I am responsible for also behaves in this way, 
which is according to spec.

Value changed and MIP events are intended to be dispatched by 
xforms-refresh, which does not occur during the normal event lifecycle 
that initializes a form.

I believe this question has occurred because of another problem that 
occurs, which is that the spec does not seem to support having the events 
go to controls after an instance replacement. 
In [1], I make the case that the instance replacement problem is separate 
from the needs of initialization, and I propose a simple fix for the 
instance replacement problem. The fix seems like a minor correction to 
reflect what most implementations are actually doing, i.e. I think the 
wording got in the way just a bit, but implementations don't and aren't 
supposed to generate events on startup.

[1] http://lists.w3.org/Archives/Public/public-forms/2007May/0081.html

Cheers,
John M. Boyer, Ph.D.
STSM: Lotus Forms Architect and Researcher
Chair, W3C Forms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com 

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer





Aaron Reed <aaronr@us.ibm.com> 
Sent by: www-forms-request@w3.org
05/24/2007 01:23 PM

To
www-forms@w3.org
cc

Subject
Re: question to implementors: handling of initial validation







Hi Joern,

For Mozilla we handle the states via the model object.  And we don't 
allow the state events (valid, invalid, readonly, etc) to be generated 
until after xforms-ready has been dispatched to that model.  So even 
though an alert will automatically handle the xforms-invalid, 
xforms-out-of-range and xforms-binding-exception events that its parent 
element can get, the element won't get the xforms-invalid or 
xforms-out-of-range events until after xforms-ready.

If you care to look at it, the code is here: 
http://lxr.mozilla.org/mozilla/source/extensions/xforms/nsXFormsModelElement.cpp#1139


--Aaron

Joern Turner wrote:
> 
> I'm wondering how other implementors handle the problem of NOT 
> displaying initial validation alerts.
> 
> It's a common problem of XForms authors that they don't like to puzzle 
> the user by showing a bunch of alerts before the user even had a chance 
> to put something into the fields (after init).
> 
> Joern
> 
> 
Received on Wednesday, 30 May 2007 03:33:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:09 GMT