Hi, So I’m trying to perform some validation actions in
order using the alert-dialog. Depending on the result of the multiple
alert dialogs (all fired on the same trigger at once), we want to submit or do
nothing. Answering negatively to any of the alerts needs to be able
to halt the action. How can I ensure that the submission is not performed
until after the alert-dialogs are complete? So currently I have: <xforms:trigger> <xforms:label>Save</xforms:label> <xforms:action
xxforms:iterate=”myinstance/things”> <xforms:action
if=”<condition>”> <show
dialog> <xforms:action> <xforms:send
submission=”mysubmit”> </xforms:action> </xforms:trigger> I have tried making the send contingent on a value set at
the end of the iterate but that doesn’t seem to work. Using a
custom dispatch doesn’t seem to work either as that fires at the same
time still. Any help would be greatly appreciated! Thanks, Stephanie -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
For clarity, it should read: <xforms:trigger>
<xforms:label>Save</xforms:label> <xforms:action
ev:event=”DOMActivate”> <xforms:action
xxforms:iterate=”myinstance/things”>
<xforms:action if=”<condition>”>
<show dialog>
<xforms:action>
</xforms:action> <xforms:send
submission=”mysubmit” if=”condition = false” > </xforms:action> </xforms:trigger> From: Stephanie Hall (TT)
[mailto:[hidden email]] Hi, So I’m trying to perform some validation actions in order
using the alert-dialog. Depending on the result of the multiple alert
dialogs (all fired on the same trigger at once), we want to submit or do
nothing. Answering negatively to any of the alerts needs to be able
to halt the action. How can I ensure that the submission is not performed
until after the alert-dialogs are complete? So currently I have: <xforms:trigger>
<xforms:label>Save</xforms:label>
<xforms:action xxforms:iterate=”myinstance/things”>
<xforms:action if=”<condition>”>
<show dialog>
<xforms:action>
<xforms:send submission=”mysubmit”>
</xforms:action> </xforms:trigger>
I have tried making the send contingent on a value set at
the end of the iterate but that doesn’t seem to work. Using a custom
dispatch doesn’t seem to work either as that fires at the same time
still. Any help would be greatly appreciated! Thanks, Stephanie -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Stephanie,
You can't use an iteration for this. Instead, when Save is triggered, you just ask the first question. Then you need to keep track of which 'thing' you are currently asking a question for, somewhere in an instance, and in the <fr:negative-choice> (or <fr:positive-choice> depending on how you phrase the question), display the next question, until all the question have been asked, at which point you can run the submission. Does this make sense? Alex On Wed, May 19, 2010 at 12:06 PM, Stephanie Hall (TT) <[hidden email]> wrote: > For clarity, it should read: > > > > <xforms:trigger> > > <xforms:label>Save</xforms:label> > > <xforms:action ev:event=”DOMActivate”> > > <xforms:action xxforms:iterate=”myinstance/things”> > > <xforms:action > if=”<condition>”> > > <show > dialog> > > <xforms:action> > > </xforms:action> > > <xforms:send submission=”mysubmit” > if=”condition = false” > > > </xforms:action> > > </xforms:trigger> > > > > > > From: Stephanie Hall (TT) [mailto:[hidden email]] > Sent: Wednesday, May 19, 2010 1:49 PM > To: [hidden email] > Subject: [ops-users] Actions in order > > > > Hi, > > > > So I’m trying to perform some validation actions in order using the > alert-dialog. Depending on the result of the multiple alert dialogs (all > fired on the same trigger at once), we want to submit or do nothing. > Answering negatively to any of the alerts needs to be able to halt the > action. How can I ensure that the submission is not performed until after > the alert-dialogs are complete? So currently I have: > > > > <xforms:trigger> > > <xforms:label>Save</xforms:label> > > <xforms:action xxforms:iterate=”myinstance/things”> > > <xforms:action if=”<condition>”> > > <show dialog> > > <xforms:action> > > <xforms:send submission=”mysubmit”> > > </xforms:action> > > </xforms:trigger> > > > > I have tried making the send contingent on a value set at the end of the > iterate but that doesn’t seem to work. Using a custom dispatch doesn’t seem > to work either as that fires at the same time still. Any help would be > greatly appreciated! > > > > Thanks, > > Stephanie > > -- > You receive this message as a subscriber of the [hidden email] mailing > list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Alex,
It makes sense but seems pretty messy to do it that way. Would there be a way, after the questions have been asked in an iteration, and then depending on the value of an instance set by the questions, to then run the submission using some other separate mechanism? In a separate action or something? Thanks, Stephanie -----Original Message----- From: Alessandro Vernet [mailto:[hidden email]] Sent: Monday, May 24, 2010 11:58 AM To: [hidden email] Subject: [ops-users] Re: RE: Actions in order Stephanie, You can't use an iteration for this. Instead, when Save is triggered, you just ask the first question. Then you need to keep track of which 'thing' you are currently asking a question for, somewhere in an instance, and in the <fr:negative-choice> (or <fr:positive-choice> depending on how you phrase the question), display the next question, until all the question have been asked, at which point you can run the submission. Does this make sense? Alex On Wed, May 19, 2010 at 12:06 PM, Stephanie Hall (TT) <[hidden email]> wrote: > For clarity, it should read: > > > > <xforms:trigger> > > <xforms:label>Save</xforms:label> > > <xforms:action ev:event="DOMActivate"> > > <xforms:action xxforms:iterate="myinstance/things"> > > <xforms:action > if="<condition>"> > > <show > dialog> > > <xforms:action> > > </xforms:action> > > <xforms:send submission="mysubmit" > if="condition = false" > > > </xforms:action> > > </xforms:trigger> > > > > > > From: Stephanie Hall (TT) > [mailto:[hidden email]] > Sent: Wednesday, May 19, 2010 1:49 PM > To: [hidden email] > Subject: [ops-users] Actions in order > > > > Hi, > > > > So I'm trying to perform some validation actions in order using the > alert-dialog. Depending on the result of the multiple alert dialogs > (all fired on the same trigger at once), we want to submit or do nothing. > Answering negatively to any of the alerts needs to be able to halt > the action. How can I ensure that the submission is not performed > until after the alert-dialogs are complete? So currently I have: > > > > <xforms:trigger> > > <xforms:label>Save</xforms:label> > > <xforms:action xxforms:iterate="myinstance/things"> > > <xforms:action if="<condition>"> > > <show dialog> > > <xforms:action> > > <xforms:send submission="mysubmit"> > > </xforms:action> > > </xforms:trigger> > > > > I have tried making the send contingent on a value set at the end of > the iterate but that doesn't seem to work. Using a custom dispatch > doesn't seem to work either as that fires at the same time still. > Any help would be greatly appreciated! > > > > Thanks, > > Stephanie > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Stephanie,
If this is what you are suggesting, you can't ask multiple questions in an iteration where each question is "asked" by an XForms action. Maybe a better way to do this would be to create your own dialog, have all the questions in one dialog, and show the questions in sequence with your own declarative XForms logic, using binds to decide when to show what question and when to enable what button in your dialog. Would this be something that could work for you? Alex On Mon, May 24, 2010 at 10:15 AM, Stephanie Hall (TT) <[hidden email]> wrote: > Hi Alex, > > It makes sense but seems pretty messy to do it that way. Would there be a way, after the questions have been asked in an iteration, and then depending on the value of an instance set by the questions, to then run the submission using some other separate mechanism? In a separate action or something? > > Thanks, > Stephanie > > -----Original Message----- > From: Alessandro Vernet [mailto:[hidden email]] > Sent: Monday, May 24, 2010 11:58 AM > To: [hidden email] > Subject: [ops-users] Re: RE: Actions in order > > Stephanie, > > You can't use an iteration for this. Instead, when Save is triggered, you just ask the first question. Then you need to keep track of which 'thing' you are currently asking a question for, somewhere in an instance, and in the <fr:negative-choice> (or <fr:positive-choice> depending on how you phrase the question), display the next question, until all the question have been asked, at which point you can run the submission. Does this make sense? > > Alex > > On Wed, May 19, 2010 at 12:06 PM, Stephanie Hall (TT) <[hidden email]> wrote: >> For clarity, it should read: >> >> >> >> <xforms:trigger> >> >> <xforms:label>Save</xforms:label> >> >> <xforms:action ev:event="DOMActivate"> >> >> <xforms:action xxforms:iterate="myinstance/things"> >> >> <xforms:action >> if="<condition>"> >> >> <show >> dialog> >> >> <xforms:action> >> >> </xforms:action> >> >> <xforms:send submission="mysubmit" >> if="condition = false" > >> >> </xforms:action> >> >> </xforms:trigger> >> >> >> >> >> >> From: Stephanie Hall (TT) >> [mailto:[hidden email]] >> Sent: Wednesday, May 19, 2010 1:49 PM >> To: [hidden email] >> Subject: [ops-users] Actions in order >> >> >> >> Hi, >> >> >> >> So I'm trying to perform some validation actions in order using the >> alert-dialog. Depending on the result of the multiple alert dialogs >> (all fired on the same trigger at once), we want to submit or do nothing. >> Answering negatively to any of the alerts needs to be able to halt >> the action. How can I ensure that the submission is not performed >> until after the alert-dialogs are complete? So currently I have: >> >> >> >> <xforms:trigger> >> >> <xforms:label>Save</xforms:label> >> >> <xforms:action xxforms:iterate="myinstance/things"> >> >> <xforms:action if="<condition>"> >> >> <show dialog> >> >> <xforms:action> >> >> <xforms:send submission="mysubmit"> >> >> </xforms:action> >> >> </xforms:trigger> >> >> >> >> I have tried making the send contingent on a value set at the end of >> the iterate but that doesn't seem to work. Using a custom dispatch >> doesn't seem to work either as that fires at the same time still. >> Any help would be greatly appreciated! >> >> >> >> Thanks, >> >> Stephanie >> >> -- >> You receive this message as a subscriber of the [hidden email] >> mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws >> >> > > > > -- > Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Alex,
I think the problem we run into with that solution is that sometimes we may not need to ask any questions at all and don't want to show the dialog to the user at all in that case, just continue with the submission. The reason I think we have to use an iterate here is that we are checking to see if it is OK that in 2 sections of our form, everything in the second section matches something in the first section in 2 of 3 categories (and these sections are in different instances). For example, if we have Section 1: Name Age Favorite Color 1. Sarah 15 Blue 2. John 22 Green Section 2: Name Age Favorite Color 1. Sarah 15 Brown We want to ask "Hey, the color set for Sarah in section 1 and 2 don't match. Continue with submission?" (We don't' care that John isn't in the section 2). But we want them to be able to go back and fix the wrong color before we send the submission. We don't want to stop the submission because sometimes the mismatch is desired. There can be multiple mismatches, also. Is there a better way to accomplish this? I am fine with displaying all of the mismatches at once, btw. Thanks, Stephanie -----Original Message----- From: Alessandro Vernet [mailto:[hidden email]] Sent: Monday, May 24, 2010 9:35 PM To: [hidden email] Subject: [ops-users] Re: RE: Re: RE: Actions in order Stephanie, If this is what you are suggesting, you can't ask multiple questions in an iteration where each question is "asked" by an XForms action. Maybe a better way to do this would be to create your own dialog, have all the questions in one dialog, and show the questions in sequence with your own declarative XForms logic, using binds to decide when to show what question and when to enable what button in your dialog. Would this be something that could work for you? Alex On Mon, May 24, 2010 at 10:15 AM, Stephanie Hall (TT) <[hidden email]> wrote: > Hi Alex, > > It makes sense but seems pretty messy to do it that way. Would there be a way, after the questions have been asked in an iteration, and then depending on the value of an instance set by the questions, to then run the submission using some other separate mechanism? In a separate action or something? > > Thanks, > Stephanie > > -----Original Message----- > From: Alessandro Vernet [mailto:[hidden email]] > Sent: Monday, May 24, 2010 11:58 AM > To: [hidden email] > Subject: [ops-users] Re: RE: Actions in order > > Stephanie, > > You can't use an iteration for this. Instead, when Save is triggered, you just ask the first question. Then you need to keep track of which 'thing' you are currently asking a question for, somewhere in an instance, and in the <fr:negative-choice> (or <fr:positive-choice> depending on how you phrase the question), display the next question, until all the question have been asked, at which point you can run the submission. Does this make sense? > > Alex > > On Wed, May 19, 2010 at 12:06 PM, Stephanie Hall (TT) <[hidden email]> wrote: >> For clarity, it should read: >> >> >> >> <xforms:trigger> >> >> <xforms:label>Save</xforms:label> >> >> <xforms:action ev:event="DOMActivate"> >> >> <xforms:action xxforms:iterate="myinstance/things"> >> >> <xforms:action >> if="<condition>"> >> >> <show >> dialog> >> >> <xforms:action> >> >> </xforms:action> >> >> <xforms:send submission="mysubmit" >> if="condition = false" > >> >> </xforms:action> >> >> </xforms:trigger> >> >> >> >> >> >> From: Stephanie Hall (TT) >> [mailto:[hidden email]] >> Sent: Wednesday, May 19, 2010 1:49 PM >> To: [hidden email] >> Subject: [ops-users] Actions in order >> >> >> >> Hi, >> >> >> >> So I'm trying to perform some validation actions in order using the >> alert-dialog. Depending on the result of the multiple alert dialogs >> (all fired on the same trigger at once), we want to submit or do nothing. >> Answering negatively to any of the alerts needs to be able to halt >> the action. How can I ensure that the submission is not performed >> until after the alert-dialogs are complete? So currently I have: >> >> >> >> <xforms:trigger> >> >> <xforms:label>Save</xforms:label> >> >> <xforms:action xxforms:iterate="myinstance/things"> >> >> <xforms:action if="<condition>"> >> >> <show dialog> >> >> <xforms:action> >> >> <xforms:send submission="mysubmit"> >> >> </xforms:action> >> >> </xforms:trigger> >> >> >> >> I have tried making the send contingent on a value set at the end of >> the iterate but that doesn't seem to work. Using a custom dispatch >> doesn't seem to work either as that fires at the same time still. >> Any help would be greatly appreciated! >> >> >> >> Thanks, >> >> Stephanie >> >> -- >> You receive this message as a subscriber of the [hidden email] >> mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws >> >> > > > > -- > Orbeon Forms - Web forms, open-source, for the Enterprise - > http://www.orbeon.com/ My Twitter: http://twitter.com/avernet > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Stephanie,
As you suggested, when users click on "submit", you could compute all the mismatches at once, store the result in an instance. If there are any mismatches, you show a dialog asking them if they really want to submit given those mismatches, and if there are no mismatches, you run the <xforms:send>. Would that work? Alex On Thu, May 27, 2010 at 2:26 PM, Stephanie Hall (TT) <[hidden email]> wrote: > Hi Alex, > > I think the problem we run into with that solution is that sometimes we may not need to ask any questions at all and don't want to show the dialog to the user at all in that case, just continue with the submission. The reason I think we have to use an iterate here is that we are checking to see if it is OK that in 2 sections of our form, everything in the second section matches something in the first section in 2 of 3 categories (and these sections are in different instances). > > For example, if we have > > Section 1: > > Name Age Favorite Color > 1. Sarah 15 Blue > 2. John 22 Green > > Section 2: > > Name Age Favorite Color > 1. Sarah 15 Brown > > We want to ask "Hey, the color set for Sarah in section 1 and 2 don't match. Continue with submission?" (We don't' care that John isn't in the section 2). But we want them to be able to go back and fix the wrong color before we send the submission. We don't want to stop the submission because sometimes the mismatch is desired. There can be multiple mismatches, also. Is there a better way to accomplish this? I am fine with displaying all of the mismatches at once, btw. > > Thanks, > Stephanie > > > -----Original Message----- > From: Alessandro Vernet [mailto:[hidden email]] > Sent: Monday, May 24, 2010 9:35 PM > To: [hidden email] > Subject: [ops-users] Re: RE: Re: RE: Actions in order > > Stephanie, > > If this is what you are suggesting, you can't ask multiple questions in an iteration where each question is "asked" by an XForms action. > Maybe a better way to do this would be to create your own dialog, have all the questions in one dialog, and show the questions in sequence with your own declarative XForms logic, using binds to decide when to show what question and when to enable what button in your dialog. > Would this be something that could work for you? > > Alex > > On Mon, May 24, 2010 at 10:15 AM, Stephanie Hall (TT) <[hidden email]> wrote: >> Hi Alex, >> >> It makes sense but seems pretty messy to do it that way. Would there be a way, after the questions have been asked in an iteration, and then depending on the value of an instance set by the questions, to then run the submission using some other separate mechanism? In a separate action or something? >> >> Thanks, >> Stephanie >> >> -----Original Message----- >> From: Alessandro Vernet [mailto:[hidden email]] >> Sent: Monday, May 24, 2010 11:58 AM >> To: [hidden email] >> Subject: [ops-users] Re: RE: Actions in order >> >> Stephanie, >> >> You can't use an iteration for this. Instead, when Save is triggered, you just ask the first question. Then you need to keep track of which 'thing' you are currently asking a question for, somewhere in an instance, and in the <fr:negative-choice> (or <fr:positive-choice> depending on how you phrase the question), display the next question, until all the question have been asked, at which point you can run the submission. Does this make sense? >> >> Alex >> >> On Wed, May 19, 2010 at 12:06 PM, Stephanie Hall (TT) <[hidden email]> wrote: >>> For clarity, it should read: >>> >>> >>> >>> <xforms:trigger> >>> >>> <xforms:label>Save</xforms:label> >>> >>> <xforms:action ev:event="DOMActivate"> >>> >>> <xforms:action xxforms:iterate="myinstance/things"> >>> >>> <xforms:action >>> if="<condition>"> >>> >>> <show >>> dialog> >>> >>> <xforms:action> >>> >>> </xforms:action> >>> >>> <xforms:send submission="mysubmit" >>> if="condition = false" > >>> >>> </xforms:action> >>> >>> </xforms:trigger> >>> >>> >>> >>> >>> >>> From: Stephanie Hall (TT) >>> [mailto:[hidden email]] >>> Sent: Wednesday, May 19, 2010 1:49 PM >>> To: [hidden email] >>> Subject: [ops-users] Actions in order >>> >>> >>> >>> Hi, >>> >>> >>> >>> So I'm trying to perform some validation actions in order using the >>> alert-dialog. Depending on the result of the multiple alert dialogs >>> (all fired on the same trigger at once), we want to submit or do nothing. >>> Answering negatively to any of the alerts needs to be able to halt >>> the action. How can I ensure that the submission is not performed >>> until after the alert-dialogs are complete? So currently I have: >>> >>> >>> >>> <xforms:trigger> >>> >>> <xforms:label>Save</xforms:label> >>> >>> <xforms:action xxforms:iterate="myinstance/things"> >>> >>> <xforms:action if="<condition>"> >>> >>> <show dialog> >>> >>> <xforms:action> >>> >>> <xforms:send submission="mysubmit"> >>> >>> </xforms:action> >>> >>> </xforms:trigger> >>> >>> >>> >>> I have tried making the send contingent on a value set at the end of >>> the iterate but that doesn't seem to work. Using a custom dispatch >>> doesn't seem to work either as that fires at the same time still. >>> Any help would be greatly appreciated! >>> >>> >>> >>> Thanks, >>> >>> Stephanie >>> >>> -- >>> You receive this message as a subscriber of the [hidden email] >>> mailing list. >>> To unsubscribe: mailto:[hidden email] >>> For general help: mailto:[hidden email]?subject=help >>> OW2 mailing lists service home page: http://www.ow2.org/wws >>> >>> >> >> >> >> -- >> Orbeon Forms - Web forms, open-source, for the Enterprise - >> http://www.orbeon.com/ My Twitter: http://twitter.com/avernet >> >> >> -- >> You receive this message as a subscriber of the [hidden email] mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws >> >> > > > > -- > Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |