Hi all, I’m trying to figure out a way to tell my users exactly
why their submissions are failing when I encounter the
xforms-submit-error event. So far I have: <xforms:submission> <xforms:action
ev:event=”xforms-submit-error”> <xxforms:message
if=”xxforms:invalid-binds(event(‘’xxforms:binding’)) = ‘myBindId’”
level=”modal”>Submission failed because…</xxforms:message> <xxforms:message
if=”xxforms:invalid-binds(event(‘’xxforms:binding’)) = ‘myBindId2’”
level=”modal”>Submission failed because…</xxforms:message> </xforms:action> </xforms:submission> And if there is an error then I do see a message, but I see
messages for the binds that are valid when I shouldn’t. Can someone
please point out what I am doing wrong? I tried following the examples in
the documentation, but it doesn’t seem to work. 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 |
Could someone please help me with
this? From: Stephanie Hall (TT)
[mailto:[hidden email]] Hi all, I’m trying to figure out a way to tell my users exactly why
their submissions are failing when I encounter the xforms-submit-error
event. So far I have: <xforms:submission>
<xforms:action ev:event=”xforms-submit-error”>
<xxforms:message if=”xxforms:invalid-binds(event(‘’xxforms:binding’)) =
‘myBindId’” level=”modal”>Submission failed because…</xxforms:message>
<xxforms:message if=”xxforms:invalid-binds(event(‘’xxforms:binding’)) =
‘myBindId2’” level=”modal”>Submission failed
because…</xxforms:message>
</xforms:action> </xforms:submission> And if there is an error then I do see a message, but I see messages
for the binds that are valid when I shouldn’t. Can someone please point
out what I am doing wrong? I tried following the examples in the
documentation, but it doesn’t seem to work. 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 |
Stephanie,
From what I'm seeing, xxforms:binding doesn't seem to be working properly. I've attached a minimal example that runs in the XForms Sandbox, if anyone wants to reproduce this issue. To reproduce: 1) Download standardxform2.xhtml in the XForms Sandbox. Click the Submit button once, and the message 'Required' should appear. 2) Type in 120 into the input field, and click the Submit button again. The message 'Not in range' should appear. 3) Repeat steps 1 and 2, but this time, change: <xf:message if="xxforms:invalid-binds(instance('views')/range) and instance('views')/range = ''">Required</xf:message> to: <xf:message if="xxforms:invalid-binds(event('xxforms:binding')) = 'my-bind'">Required</xf:message> and <xf:message if="xxforms:invalid-binds(instance('views')/range) and number(instance('views')/range) >= 100">Not in range</xf:message> to: <xf:message if="xxforms:invalid-binds(event('xxforms:binding')) = 'my-bind2'">Not in range</xf:message> No messages should appear with this change. Meanwhile, Stephanie, as a workaround, you could do what I did in standardxform2.xhtml and have your if statement within <xforms:message> include an 'xxforms:invalid-binds' statement that points directly to the node with the binding, and add the condition that was used in the binding.....instead of using an extension function. Hope this helps, Philip standardxform2.xhtml
|
Hi Philip,
Thanks for your help, but I keep getting "Invalid Submit" whenever I try to access the standardxform2.xhtml file you mentioned... Thanks, Stephanie -----Original Message----- From: Philip.Cantin [mailto:[hidden email]] Sent: Monday, December 21, 2009 11:32 AM To: [hidden email] Subject: [ops-users] RE: Using xxforms:invalid-binds() with <xxforms:message> on submit error Stephanie, From what I'm seeing, xxforms:binding doesn't seem to be working properly. I've attached a minimal example that runs in the XForms Sandbox, if anyone wants to reproduce this issue. To reproduce: 1) Download standardxform2.xhtml in the XForms Sandbox. Click the Submit button once, and the message 'Required' should appear. 2) Type in 120 into the input field, and click the Submit button again. The message 'Not in range' should appear. 3) Repeat steps 1 and 2, but this time, change: <xf:message if="xxforms:invalid-binds(instance('views')/range) and instance('views')/range = ''">Required</xf:message> to: <xf:message if="xxforms:invalid-binds(event('xxforms:binding')) = 'my-bind'">Required</xf:message> and <xf:message if="xxforms:invalid-binds(instance('views')/range) and number(instance('views')/range) >= 100">Not in range</xf:message> to: <xf:message if="xxforms:invalid-binds(event('xxforms:binding')) = 'my-bind2'">Not in range</xf:message> No messages should appear with this change. Meanwhile, Stephanie, as a workaround, you could do what I did in standardxform2.xhtml and have your if statement within <xforms:message> include an 'xxforms:invalid-binds' statement that points directly to the node with the binding, and add the condition that was used in the binding.....instead of using an extension function. Hope this helps, Philip http://n4.nabble.com/file/n976377/standardxform2.xhtml standardxform2.xhtml Stephanie Hall (TT) wrote: > > Could someone please help me with this? > > > > From: Stephanie Hall (TT) > [mailto:[hidden email]] > Sent: Thursday, December 17, 2009 4:05 PM > To: [hidden email] > Subject: [ops-users] Using xxforms:invalid-binds() with > <xxforms:message> on submit error > > > > Hi all, > > > > I’m trying to figure out a way to tell my users exactly why their > submissions are failing when I encounter the xforms-submit-error event. > > > > So far I have: > > > > <xforms:submission> > > <xforms:action ev:event=”xforms-submit-error”> > > <xxforms:message > if=”xxforms:invalid-binds(event(‘’xxforms:binding’)) = ‘myBindId’” > level=”modal”>Submission failed because…</xxforms:message> > > <xxforms:message > if=”xxforms:invalid-binds(event(‘’xxforms:binding’)) = ‘myBindId2’” > level=”modal”>Submission failed because…</xxforms:message> > > </xforms:action> > > </xforms:submission> > > > > And if there is an error then I do see a message, but I see messages > for the binds that are valid when I shouldn’t. Can someone please > point out what I am doing wrong? I tried following the examples in > the documentation, but it doesn’t seem to work. > > > > 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 > > View this message in context: http://n4.nabble.com/Using-xxforms-invalid-binds-with-xxforms-message-on-submit-error-tp974421p976377.html Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com. -- 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 |
Stephanie,
Now I'm curious: is this an error message you're getting? If so, what exactly does it look like? And what is your current Orbeon setup? (Tomcat or Liferay, current build being used, etc.) ---Philip
|
Hi Philip,
I mean in the email, or on nabble. I just click on http://n4.nabble.com/file/n976377/standardxform2.xhtml and I get "Invalid Submit". Thanks, Stephanie -----Original Message----- From: Philip.Cantin [mailto:[hidden email]] Sent: Monday, December 21, 2009 12:33 PM To: [hidden email] Subject: [ops-users] RE: RE: Using xxforms:invalid-binds() with <xxforms:message> on submit error Stephanie, Now I'm curious: is this an error message you're getting? If so, what exactly does it look like? And what is your current Orbeon setup? (Tomcat or Liferay, current build being used, etc.) ---Philip Stephanie Hall (TT) wrote: > > Hi Philip, > > Thanks for your help, but I keep getting "Invalid Submit" whenever I > try to access the standardxform2.xhtml file you mentioned... > > Thanks, > Stephanie > > -----Original Message----- > From: Philip.Cantin [mailto:[hidden email]] > Sent: Monday, December 21, 2009 11:32 AM > To: [hidden email] > Subject: [ops-users] RE: Using xxforms:invalid-binds() with > <xxforms:message> on submit error > > > Stephanie, > > From what I'm seeing, xxforms:binding doesn't seem to be working properly. > I've attached a minimal example that runs in the XForms Sandbox, if > anyone wants to reproduce this issue. To reproduce: > > 1) Download standardxform2.xhtml in the XForms Sandbox. Click the > Submit button once, and the message 'Required' should appear. > 2) Type in 120 into the input field, and click the Submit button again. > The message 'Not in range' should appear. > 3) Repeat steps 1 and 2, but this time, change: > > <xf:message if="xxforms:invalid-binds(instance('views')/range) and > instance('views')/range = ''">Required</xf:message> > > to: > > <xf:message if="xxforms:invalid-binds(event('xxforms:binding')) = > 'my-bind'">Required</xf:message> > > > and > > <xf:message if="xxforms:invalid-binds(instance('views')/range) and > number(instance('views')/range) >= 100">Not in range</xf:message> > > to: > > <xf:message if="xxforms:invalid-binds(event('xxforms:binding')) = > 'my-bind2'">Not in range</xf:message> > > > No messages should appear with this change. > > > > Meanwhile, Stephanie, as a workaround, you could do what I did in > standardxform2.xhtml and have your if statement within > <xforms:message> include an 'xxforms:invalid-binds' statement that > points directly to the node with the binding, and add the condition > that was used in the binding.....instead of using an extension function. > > > Hope this helps, > > Philip > > > http://n4.nabble.com/file/n976377/standardxform2.xhtml > standardxform2.xhtml > > > Stephanie Hall (TT) wrote: >> >> Could someone please help me with this? >> >> >> >> From: Stephanie Hall (TT) >> [mailto:[hidden email]] >> Sent: Thursday, December 17, 2009 4:05 PM >> To: [hidden email] >> Subject: [ops-users] Using xxforms:invalid-binds() with >> <xxforms:message> on submit error >> >> >> >> Hi all, >> >> >> >> I’m trying to figure out a way to tell my users exactly why their >> submissions are failing when I encounter the xforms-submit-error event. >> >> >> >> So far I have: >> >> >> >> <xforms:submission> >> >> <xforms:action ev:event=”xforms-submit-error”> >> >> <xxforms:message >> if=”xxforms:invalid-binds(event(‘’xxforms:binding’)) = ‘myBindId’” >> level=”modal”>Submission failed because…</xxforms:message> >> >> <xxforms:message >> if=”xxforms:invalid-binds(event(‘’xxforms:binding’)) = ‘myBindId2’” >> level=”modal”>Submission failed because…</xxforms:message> >> >> </xforms:action> >> >> </xforms:submission> >> >> >> >> And if there is an error then I do see a message, but I see messages >> for the binds that are valid when I shouldn’t. Can someone please >> point out what I am doing wrong? I tried following the examples in >> the documentation, but it doesn’t seem to work. >> >> >> >> 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 >> >> > > -- > View this message in context: > http://n4.nabble.com/Using-xxforms-invalid-binds-with-xxforms-message- > on-submit-error-tp974421p976377.html > Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com. > > > -- > 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 > > View this message in context: http://n4.nabble.com/Using-xxforms-invalid-binds-with-xxforms-message-on-submit-error-tp974421p976439.html Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com. -- 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 |
Stephanie,
Okay, I understand now. To run the example, you need to run that XHTML file within Orbeon (since it uses Orbeon-specific extensions such as 'xxforms:invalid-binds'). You can do this through Orbeon's XForms sandbox. First, download the file onto your computer, then go to http://www.orbeon.com/orbeon/xforms-sandbox/ and, under the 'Upload Local File' tab, choose the downloaded file and click the 'Run XForms' button. Hope this helps, Philip
|
Free forum by Nabble | Edit this page |