If I have constraints spread over multiple binds (to make it easy to determine which constraint failed) like so:
<xf:bind nodeset="abc"> <xf:bind id="first" constraint="false()"/> <xf:bind id="second" constraint="false()"/> </xf:bind> Then the xxforms:invalid-bind function only returns 'first' when passed the abc nodeset. Is this a bug or a result of some arcane aspect of the spec? Adrian |
Administrator
|
It's a "feature" ;-)
In plain XForms, during revalidation, there is never a need to evaluate validity once a node has been marked as invalid, because once it's the case, another validation constraint cannot put it back to a valid state. So we have code which tries not to evaluate further validity conditions for that node. The result is that xxforms:invalid-bind(), at the moment does not return more than one bind id. -Erik On Feb 3, 2009, at 9:31 PM, Adrian Baker wrote: > > If I have constraints spread over multiple binds (to make it easy to > determine which constraint failed) like so: > > <xf:bind nodeset="abc"> > <xf:bind id="first" constraint="false()"/> > <xf:bind id="second" constraint="false()"/> > </xf:bind> > > Then the xxforms:invalid-bind function only returns 'first' when > passed the > abc nodeset. Is this a bug or a result of some arcane aspect of the > spec? > > Adrian > -- > View this message in context: http://www.nabble.com/xxforms%3Ainvalid-binds-only-returns-first-bind-when-there-are-multiple-constraints-tp21823309p21823309.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 Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.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 |
That's a pity, because then even with the help of this new extension function, you still need to duplicate the constraint condition to output correct alert text or an error summary for nodes with multiple broken constraints.
|
Administrator
|
It probably depends on the use case.
E.g. if bind #1 checks on "is a word" and bind #2 checks on "starts with letter A", this is still useful. If bind #1 fails, you would display an alert saying e.g. "Please enter a word", and if #2 fails, "The word must start with letter A". -Erik On Feb 4, 2009, at 12:47 AM, Adrian Baker wrote: > > That's a pity, because then even with the help of this new extension > function, you still need to duplicate the constraint condition to > output > correct alert text or an error summary for nodes with multiple broken > constraints. > > > Erik Bruchez wrote: >> >> It's a "feature" ;-) >> >> In plain XForms, during revalidation, there is never a need to >> evaluate validity once a node has been marked as invalid, because >> once >> it's the case, another validation constraint cannot put it back to a >> valid state. >> >> So we have code which tries not to evaluate further validity >> conditions for that node. >> >> The result is that xxforms:invalid-bind(), at the moment does not >> return more than one bind id. >> >> -Erik >> >> On Feb 3, 2009, at 9:31 PM, Adrian Baker wrote: >> >>> >>> If I have constraints spread over multiple binds (to make it easy to >>> determine which constraint failed) like so: >>> >>> <xf:bind nodeset="abc"> >>> <xf:bind id="first" constraint="false()"/> >>> <xf:bind id="second" constraint="false()"/> >>> </xf:bind> >>> >>> Then the xxforms:invalid-bind function only returns 'first' when >>> passed the >>> abc nodeset. Is this a bug or a result of some arcane aspect of the >>> spec? >>> >>> Adrian >>> -- >>> View this message in context: >>> http://www.nabble.com/xxforms%3Ainvalid-binds-only-returns-first-bind-when-there-are-multiple-constraints-tp21823309p21823309.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 >> >> -- >> Orbeon Forms - Web Forms for the Enterprise Done the Right Way >> http://www.orbeon.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://www.nabble.com/xxforms%3Ainvalid-binds-only-returns-first-bind-when-there-are-multiple-constraints-tp21823309p21826479.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 Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.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 |
Free forum by Nabble | Edit this page |