Re: xforms-value-changed event problem

Posted by fl.schmitt(ops-users) on
URL: https://discuss.orbeon.com/xforms-value-changed-event-problem-tp34092p34093.html

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





--
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