Re: xforms-value-changed event problem

Posted by Erik Bruchez on
URL: https://discuss.orbeon.com/xforms-value-changed-event-problem-tp34092p34094.html

Florian,

The spec seems to have a hole here. It mentions there should be a
refresh. However, it doesn't say that "the node must be marked for
dispatching the xforms-value-changed event" as it does in other cases.

But clearly, the control is bound to a node with value v1, and then upon
refresh is bound to a new node with value v2, and the control is not
notified that its value has changed. This is quite counter-intuitive I
think.

In fact, Orbeon Forms went beyond the spec and assumed that all nodes
actually changed. However, this case shows that this was broken at some
point! I committed a fix that should make this work again.

I have also sent an email to the public XForms list at W3C to mention
the problem.

-Erik

Florian Schmitt wrote:

> Hi,
>
>> The 'xforms-value-changed' event didn't fire when click 'Get Next
>> Person' button. In fact, the value of person's age is changed.
>
> That event is "dispatched in response to: a change to an instance data
> node bound to a form control." I suppose it doesn't matter if the
> _instance_ changes; relevant is only a change regarding the node value
> in a certain instance.
>
>  > I test these case:
>
>> 1.  'replace' of submission control is 'instance',
>> xforms-value-changed event is not fired;
>
> That's correct in my opinion. Neither the value of the "age" node of
> instance A nor that of the same node of instance B have changed. It's
> not a change of the value of a certain node that happened, instead it's
> a replacement of the complete instance; the _nodes_ of the instances
> haven't changed.
>
>> 2.  'replace' of submission control is 'node', xforms-value-changed
>> event is fired;
>
> Here the instance remains instance A, and its node "age" has changed, so
> the event should get fired.
>
>> 3.  'replace' of submission control is 'text', xforms-value-changed
>> event is fired;
>
> Same as 2.
>
> To check if the node value has changed after an instance change, there
> are different ways. One could use a second "observer" instance with a
> node bound to the "age" node of the main instance and its value
> calculated from that node. The node of the "observer" instance then
> should change in every of the three test cases, and in all the three
> cases a change event should get dispatched regarding the "observer" node.
>
>
> florian
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws