W3C home > Mailing lists > Public > www-forms@w3.org > November 2005

Re: Validation errors during xforms-submit

From: Aaron Reed <aaronr@us.ibm.com>
Date: Thu, 10 Nov 2005 15:06:43 -0600
To: www-forms@w3.org
Message-ID: <dl0cqp$tc9$1@sea.gmane.org>

Ulrich Nicolas Lissť wrote:
> 
> Hi All,
> 
> I have a question about submit processing. At 
> http://www.w3.org/TR/2005/PER-xforms-20051006/slice11.html#submit-event 
> you can read:
> 
> ...
> 2. All selected instance data nodes are checked for validity according 
> to the definition in 4.3.5 The xforms-revalidate Event (no notification 
> events are marked for dispatching due to this operation). Any selected 
> instance data node that is required but empty or found to be invalid 
> stops submission processing after dispatching event xforms-submit-error.
> ...
> 
> My question is: How is the UI expected to behave in case some nodes are 
> found to be invalid ?
> 
> Since no notification events are marked for dispatching one could draw 
> the conclusion that the UI isn't updated as well. But this would mean 
> that the user won't see which fields are invalid and caused the 
> submission to fail. There could be an event handler for 
> xforms-submit-error executing a xf:refresh in order to update all 
> control's states, but I don't think this would be good option. That way 
> the form authors would be forced to attach such an event handler to any 
> xf:submission just to be able to visualize what went wrong. So how 
> can/should this be accomplished ?
> 
> Regards,
> Uli.

Hey Uli,

Well, if the form author is really anxious about it, they can put a 
refresh inside a xforms-submit handler on the submission element so that 
all of the controls bound to that instance data are refreshed before the 
default handling is done.  Or make sure submission is triggered outside 
of any control that can be used to update instance data (xf:submit or in 
DOMActivate handler on trigger, for example).  So any necessary refresh 
is automatically done due to the focus change when the user gives focus 
to the xf:submit, for example.

But having said that, I don't know the reasoning behind why the WG 
decided not to require the processor to refresh the instance prior to 
submission.

--Aaron
Received on Thursday, 10 November 2005 21:16:15 GMT

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