Different alert per restriction question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Different alert per restriction question

Siarhei-2
Hi All,

Looking at the documentation it appears that it is possible to *only* have one (type of) alert message per input field... The question is it possible to specify a specific alert message per validation rule? E.g. separate alerts for required en for field length restrictions on the same field?

Thanks in advance!

Regards,
Siarhei
Reply | Threaded
Open this post in threaded view
|

Re: Different alert per restriction question

Erik Bruchez
Administrator
It is possible through the xxforms:invalid-binds() extension function:

   http://www.orbeon.com/ops/doc/reference-xforms-functions#xxforms-invalid-binds

You can then write:

   <xforms:alert value="if (xxforms:invalid-binds(.) = 'age-limit')  
then ... else ..."/>

Note however that the function actually only returns the first invalid  
bind at the moment, not all of them. So this works for scenarios where  
error messages go from general to specific.

-Erik

On May 28, 2009, at 5:55 AM, Siarhei wrote:

>
> Hi All,
>
> Looking at the documentation it appears that it is possible to  
> *only* have
> one (type of) alert message per input field... The question is it  
> possible
> to specify a specific alert message per validation rule? E.g. separate
> alerts for required en for field length restrictions on the same  
> field?
>
> Thanks in advance!
>
> Regards,
> Siarhei
> --
> View this message in context: http://www.nabble.com/Different-alert-per-restriction-question-tp23761155p23761155.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
Reply | Threaded
Open this post in threaded view
|

Re: Different alert per restriction question

Siarhei-2
Thank you!

Regards,
Siarhei Dudzin
www.iprofs.nl

Erik Bruchez wrote
It is possible through the xxforms:invalid-binds() extension function:

   http://www.orbeon.com/ops/doc/reference-xforms-functions#xxforms-invalid-binds

You can then write:

   <xforms:alert value="if (xxforms:invalid-binds(.) = 'age-limit')  
then ... else ..."/>

Note however that the function actually only returns the first invalid  
bind at the moment, not all of them. So this works for scenarios where  
error messages go from general to specific.

-Erik

On May 28, 2009, at 5:55 AM, Siarhei wrote:

>
> Hi All,
>
> Looking at the documentation it appears that it is possible to  
> *only* have
> one (type of) alert message per input field... The question is it  
> possible
> to specify a specific alert message per validation rule? E.g. separate
> alerts for required en for field length restrictions on the same  
> field?
>
> Thanks in advance!
>
> Regards,
> Siarhei
> --
> View this message in context: http://www.nabble.com/Different-alert-per-restriction-question-tp23761155p23761155.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.com.
>
>
> --
> You receive this message as a subscriber of the ops-users@ow2.org  
> mailing list.
> To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
> For general help: mailto:sympa@ow2.org?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 ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws