Posted by
Maciej Arciuch on
Oct 15, 2009; 9:17am
URL: https://discuss.orbeon.com/A-problem-with-unnecessary-xforms-value-changed-after-replace-instance-submission-and-one-more-thing-tp252592p252742.html
The previous mail I've sent got somehow corrupted, here I repost it using Nabble, I'm sorry for inconvenience and here it is again:
I've been wondering if you could help me with a problem I've
encountered. The system I'm working on provides a simple facility to
save the content of the current form using a submission. The submission
is a replace="instance" submission, its PFC-based backend makes some
(small) data modifications and returns the altered version back to the
form. In order to simplify the considerations I've forged a mock form
with a mock GET submission to a static file, the same file which is the
default value of the instance. This submission mocks my "save submission".
The problem is that even if the data returned from the submission is
exactly the same as the data sent (which is the case of my test form),
the xforms-value-changed is triggered and an event handler subscribed to
xforms-value-changed event and placed within a control bound to data
that hasn't changed gets fired. Is it a correct behaviour? If it is - can
I suppress xforms-value-changed after the submission? If it's not - will
it be fixed? It is easy to reproduce this problem with a form I've
uploaded here:
http://gamma.mini.pw.edu.pl/~arciuchm/esp.xhtml (it works
in XForms Sandbox). Why does the popup appear?
So far I've solved the problem by making my submission replace="none"
and triggering an ugly JavaScript redirect upon xforms-submit-done. Is
there any better solution? I've browsed the archives searching for a
clear answer, but I couldn't find a definitive answer to my problem. If
I've missed something, I apologize and please point me to it.
The second problem is that the form's HTML file contains a meta field
(<meta> something </meta>), which shouldn't be displayed, but after
Orbeon transformations the meta tag get opened (see the top). How can I
fix it?
Thanks in advance,
Maciek