proposal for new submission replace mode 'new'

Dear WG,

recently i came across a use case that is not easy to have with
current XForms: imagine a site that allows to fill in a form and after
you're done opens a window for printing a formatted report composed
from the input data.

To get that in XForms you will need to write a submission with
replace="instance" (returning a URL as response) and fire a load
action on xforms-submit-done to open the new window with show="new'".
So far so good but you are forced to persist the data on the server
and fetch them with the load action. This is inconvenient especially
if the data are transient in nature and forces to have an extra bit of
server-logic that deals with the persisted data on the server (like
cleaning up sometime).

We have implemented a new submission replace mode 'new' (the name
might not be the best but is taken from load/@show="new") that allows
to do it in one step. Besides being easier to read and write for the
author it also avoids being dependent on extra external logic.
Implementation should be easy as it is similar to replace="all"
(besides the fact that the processor will continue to iive) - it just
returns the data as response body and the xforms processor just has to
open a new window to display them.

As the use case seems common it might be a candidate for consideration
for one of the next versions of XForms.


Joern Turner

Received on Tuesday, 25 May 2010 21:36:06 UTC