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

Re: Validation errors during xforms-submit

From: Ulrich Nicolas LissÚ <u.n.l@gmx.net>
Date: Tue, 22 Nov 2005 09:58:33 +0100
Message-ID: <4382DDB9.4020308@gmx.net>
To: Aaron Reed <aaronr@us.ibm.com>
CC: www-forms@w3.org

Hi Aaron,

thank you, this clears things. Obviously my thinking is too tied up with 
server-side processing (where a batch update of multiple controls at a 
time could lead to this confusion).

Regards,
Uli.

Aaron Reed wrote:
> 
> 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
> 
> 
> 
> 


-- 
Ulrich Nicolas LissÚ
Received on Tuesday, 22 November 2005 08:59:00 GMT

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