>If you do not specify messages for these keys in your own application
>resource bundle, validator will fall back to its own default message
>strings  ... so you don't have to override these unless the defaults do not
>help you.

Does shale also internationalize these messages then? Also in Hebrew and
Korean or any other script for that matter?

>That is what would happen if the form is actually submitted, but the client
>side checks are designed to prevent the form submit from happening if there
>are any errors detected there -- so things never get far enough along for
>the server side checks to kick in (unless you've disabled client side
>Javascript).

Why I asked is because I want to use the client check to prevent
unneeded return trips to the server. I just don't like the looks of the
alert. I was hoping shale also made a little client script available
which populates the h:message with the appropriate error message.

Thank you for your help,=

JS Portal - Support
Dasstraat 21
2623CB Delft
the Netherlands
E: [EMAIL PROTECTED]
W: www.jsportal.com 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
McClanahan
Sent: Tuesday, December 12, 2006 12:36 PM
To: user@shale.apache.org
Subject: Re: <s:commonsValidator> question

On 12/11/06, JS Portal support team <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have two questions concerning <s:commonsValidator> tag
>
> 1. Is there a way to set the message attribute of the s:commonsValidator
> with the value resulting from?:
>
> <h:outputFormat escape="false" value="#{labels['err.requiredField']}">
>         <f:param value="#{labels['labels.user.email']}" />
> </h:outputFormat>
>
> This way I don't have to add a long list of err.required.email,
> err.required.name etc. to my i18n properties files. Just a compilation
> of my err.requiredField ({0} required) combined with the field name will
> be enough.


If you do not specify messages for these keys in your own application
resource bundle, validator will fall back to its own default message
strings  ... so you don't have to override these unless the defaults do not
help you.

2. Is there a way to have the client check also print the error message
> to the <h:message for="myField"/> in stead of having the JavaScript
> alert pop up?


That is what would happen if the form is actually submitted, but the client
side checks are designed to prevent the form submit from happening if there
are any errors detected there -- so things never get far enough along for
the server side checks to kick in (unless you've disabled client side
Javascript).

Thank you and have a great day,
> Joost Schouten
> Director


Craig


JS Portal
> Dasstraat 21
> 2623CB Delft
> the Netherlands
> P: +31 6 160 160 14
> E: [EMAIL PROTECTED]
> W: www.jsportal.com
>
>

Reply via email to