Re: Events and replace="instance"

Erik Bruchez wrote:
> 
> All,
> 
> Let's assume that an instance is submitted with replace="instance".
> 
> The spec (errata) says:
> 
>   "[...] all of the internal instance data ... is replaced with the
>   result. Once the XML instance data has been replaced, the rebuild,
>   recalculate, revalidate and refresh operations are performed on the
>   model, without dispatching events to invoke those four
>   operations. Submit processing then concludes after dispatching
>   xforms-submit-done."
> 
> What is the rationale behind the "no-event" clause? If a control is
> bound to a node whose value changes because the instance is entirely
> replaced, wouldn't it make sense for events to be sent by that control
> upon refresh? At the very least, shouldn't this be an option?
> 
> Thanks for your opinion,

As someone has pointed out privately, it appears that I somewhat misread 
this text. The above means that no events are dispatched to trigger the 
recalculate, revalidate and refresh operations, however there is no 
mention that the refresh operation does not trigger further events. So 
my new reading of this is that yes in fact refresh must cause those 
events (xforms-value-changed, xforms-valid, xforms-invalid, 
xforms-optional, xforms-required, xforms-readwrite, xforms-readonly, and 
xforms-enabled, xforms-disabled) to be dispatched upon instance replacement.

-Erik

Received on Monday, 15 August 2005 22:35:04 UTC