- From: Erik Bruchez <ebruchez@orbeon.com>
- Date: Wed, 08 Aug 2007 15:42:55 +0200
- To: "Forms WG (new)" <public-forms@w3.org>
John,
> Well, the discussion about why asynchronous submission became the
> default also covered the fact that it isn't good practice in XForms
> 1.0 to use a sequence of send actions where each submission launched
> by a send counts on the successful completion of its predecessor.
>
> The reason is that you have no way to know whether the submission
> completed successfully or whether there was an error. So the
> sequence is fragile.
>
> The best practice is to put the send action that initiates a
> successor submission into the xforms-submit-done handler of its
> predecessor submission. This way, if a submission fails, it does
> not continue with the sequence of submissions as if nothing went
> wrong. Instead, the form does whatever the author specifies should
> be done to recover from the error.
>
> This best practice is also interesting because it works whether the
> submission is synchronous or asynchronous.
That's a good point. I guess because often we call submissions from
the server-side to built-in services, we have not been as sensitive to
that fragility. But I reckon that reacting to xforms-submit-done is
the only robust way of executing follow-up actions, even though from a
syntactical point of view this is not always obvious.
I realize that this is not the current topic, but to solve the syntax
issue, you could still imagine xforms:submission as an action:
<xforms:action>
...
<xforms:submision ...>
<xforms:action:ev:event="xforms-submit-done">
<xforms:submission ...>
...
</xforms:submission>
</xforms:action>
</xforms:submission>
</xforms:action>
-Erik
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/
Received on Wednesday, 8 August 2007 13:43:03 UTC