Hi there,
This is a duplicate of a unanswered question posted on stackoverflow a month ago (here). We're using xf:constraint with a level='warning' and we'd like to be able to do some stuffs based upon the evaluation of this constraints. For example, display a xforms dialog if all warning constraints are not 'true'. But when I tried to use the xxf:evaluate-bind-property() or xxf:valid() functions, it doesn't work. This functions seem to not treat this constaints as real ones (the instance is valid with false warning constraints and evaluate-bind-property doesn't get the real value of this constraints). Is there something I'm doing wrong or is there a way I don't see to achieve this ? Eric |
Administrator
|
Hi Eric,
Sorry for not responding to your message on Stack Overflow earlier! I've now posted an answer there: http://stackoverflow.com/a/27134719/5295. Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Allessandro,
Thank you for your answer. I think, the events will do the trick, I'm going to try right now.
Eric
De : Alessandro Vernet [via Orbeon Forms community mailing list] [mailto:ml-node+[hidden email]] Envoyé : mardi 25 novembre 2014 20:02 À : Sigaud Éric Objet : Re: Interact with warning-level-constraints Sorry for not responding to your message on Stack Overflow earlier! I've now posted an answer there: http://stackoverflow.com/a/27134719/5295. Alex --
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet If you reply to this email, your message will be added to the discussion below:
http://discuss.orbeon.com/Interact-with-warning-level-constraints-tp4659266p4659267.html
|
In reply to this post by Alessandro Vernet
Hi Alex,
I've tried your suggestion, but it's a bit tricky, 'cause the exact behaviour I'm looking for is opening a dialog when the user tries to change the current
page (fr:view in the code) based upon there are, or not, warnings... With events, I guess, I should keep track of every xxforms-constraints-changed to be able to "know" the state when 'Next' is clicked.
I saw this in the error-summary code : count(instance('fr-errors-instance')/error[@level = 'error'])
If I could use it with @level ='warning', would be great, but didn't succed yet. I think, this fr-error-instance is not resolved in my context (always '0'
as count value, actually even if try to count all elements without restrictions in this 'pseudo-instance').
Did I miss something ?
De : Alessandro Vernet [via Orbeon Forms community mailing list] [mailto:ml-node+[hidden email]] Envoyé : mardi 25 novembre 2014 20:02 À : Sigaud Éric Objet : Re: Interact with warning-level-constraints Sorry for not responding to your message on Stack Overflow earlier! I've now posted an answer there: http://stackoverflow.com/a/27134719/5295. Alex --
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet If you reply to this email, your message will be added to the discussion below:
http://discuss.orbeon.com/Interact-with-warning-level-constraints-tp4659266p4659267.html
|
Free forum by Nabble | Edit this page |