- From: Mark Birbeck <mark.birbeck@x-port.net>
- Date: Tue, 31 Oct 2006 19:21:27 +0000
- To: "Lee Standen" <nom@standen.id.au>
- Cc: www-forms@w3.org
Hi Lee, I'm not with you...are you saying this doesn't work? It should do, and it's a technique that is used quite a lot. The other way to do it is to dispatch an event on the successful first submission, and then listen for that. We often do things like this: <xf:model id="mdl"> <xf:submission id="submission1" method="post" action="somepage.cgi" ref="instance('instance1')" replace="instance" instance="instance1" > <xf:dispatch ev:event="xforms-submit-done" target="mdl" name="login-complete" /> </xf:submission> <xf:action ev:event="login-complete"> ... </xf:action> </xf:model> In other words, we tend to map the "submission complete" event to something at a higher level, like "login complete", "customer created", "blog deleted", etc. Regards, Mark On 31/10/06, Lee Standen <nom@standen.id.au> wrote: > > Hi Guys, > > I'm hoping someone has come across this, and knows the "correct" way to > implement it. > > I'm trying to setup an submission so that a successful submission > triggers another submission to occur, and I've not had too much luck so > far. These are a couple of the things I've tried: > > This is a simplified version, but basically instance2 contains a list of > values which are (potentially) changed when instance1 is submitted, so > it needs to be refreshed before allowing the user to submit more forms. > > Ideas? > > Snippet: > <xf:model id="mdl"> > <xf:instance id="instance1" src="somepage.cgi" /> > <xf:instance id="instance2" src="someotherpage.cgi" /> > > <xf:submission id="submission1" method="post" action="somepage.cgi" > ref="instance('instance1')" replace="instance" instance="instance1"> > <xf:send ev:event="xforms-submit-done" submission="submission2" /> > </xf:submission> > > <xf:submission id="submission2" method="post" action="someotherpage.cgi" > ref="instance('instance2')" replace="instance" instance="instance2" /> > </xf:model> > > .... > > <xf:submit submission="submission1"> > <xf:label>Save & Reload List</xf:label> > </xf:submit> > > > > > -- 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 19:21:47 UTC