W3C home > Mailing lists > Public > www-forms@w3.org > October 2002

Deferred updates made (not so) easy

From: Jérôme Nègre <jerome.negre@e-xmlmedia.fr>
Date: Thu, 10 Oct 2002 17:02:47 +0200
Message-ID: <3DA59697.9050404@e-xmlmedia.fr>
To: "www-forms@w3.org" <www-forms@w3.org>


the deferred update behaviour described in chapter 10.1.x may lead to 
strange results.

Having the following model:
  <bind nodeset="my:b" calculate="2*number(/my:root/my:a)"/>

And the following action:
  <setvalue ref="my:a">10</setvalue>

When this action is executed:

1/ <action> => All 4 deferred update flags are set to false.

2/ <setvalue/> => The value of my:a is set to 10, flags for recalculate, 
revalidate and refresh are set to true.

3/ <refresh/> => An event xforms-refresh is dispatched, the flag for 
refresh is set to false. Now, all form controls bound to my:a display 
"10", while form controls bound to my:b still display "2".

4/ </action> => Since the flags for recalculate and revalidate are true, 
  events xforms-recalculate and xforms-revalidate are sent. my:a has a 
value of "10" and my:b of "20". However, no event xforms-refresh is 
sent, since that flag was cleared by <refresh>.

So after the end of this action, the value of my:b is "20", but the 
value displayed by controls bound to this node is "2".

Now for my question: do we really want such a thing to be possible?

Received on Thursday, 10 October 2002 11:04:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:07 UTC