- From: Jérôme Nègre <jerome.negre@e-xmlmedia.fr>
- Date: Thu, 10 Oct 2002 17:02:47 +0200
- To: "www-forms@w3.org" <www-forms@w3.org>
Hi,
the deferred update behaviour described in chapter 10.1.x may lead to
strange results.
Having the following model:
<model>
<instance>
<my:root>
<my:a>1</my:a>
<my:b>2</my:b>
</my:root>
</instance>
<bind nodeset="my:b" calculate="2*number(/my:root/my:a)"/>
</model>
And the following action:
<action>
<setvalue ref="my:a">10</setvalue>
<refresh>
</action>
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?
Regards,
Jérôme
Received on Thursday, 10 October 2002 11:04:27 UTC