Re: XForms - Submission on multiple instances?

Hi Aaron,

> I think what Lee is saying is that he is doing a submission that will
> replace the first instance.  And that the act of this replacement of the
> first instance will affect instance nodes in a second instance document
> (I assume through recalculate or xforms-value-changed handlers?).  So he
> wants to be sure that all of that is done before he goes ahead and
> submits the second instance document.  So not as simple as just waiting
> for xforms-submit-done, is it?  It might actually work in some
> processors due to the nature of single threading, but it isn't
> guaranteed to work, is it?

Yes...I agree that this is probably what Lee is saying. (Lee? Is this
right?) But I think the second submission should not take place until
the first is complete.

You are right that some processors are asynchronous and some
synchronous (and there is a new flag in XForms 1.1 to allow authors to
make explicit how a particular submission should behave), but you
should only receive "xforms-submit-done" once the submission has fully
completed. Whether that action handler runs in a new thread or not
shouldn't make any difference to the fact that by the time this
handler _is_ run, the instance should have been updated.

Ah...hang on though...I've just had one thought...if there are
calculations involved (bind statements using @calculate) then a
rebuild might be needed. Perhaps that's the problem that Lee is
having--perhaps his second submission *is* correctly taking place
after the first, but because of the way deferred update works, it may
be that his second instance is not being updated with the data from
the returned first instance until both submissions are complete, and
so he never sees it.

Regards,

Mark

-- 
Mark Birbeck
CEO
x-port.net Ltd.

e: Mark.Birbeck@x-port.net
t: +44 (0) 20 7689 9232
w: http://www.formsPlayer.com/
b: http://internet-apps.blogspot.com/

Download our XForms processor from
http://www.formsPlayer.com/

Received on Tuesday, 31 October 2006 22:00:57 UTC