[ 
http://issues.apache.org/struts/browse/SHALE-325?page=comments#action_38603 ] 
            
Gary VanMatre commented on SHALE-325:
-------------------------------------

I think your problem is that the CommonsValidator can't find the message.
There are a couple of places that you can register a custom message.
You can load the resource bundle within the page and use the msg attribute.


<val:commonsValidator
                   type="evenInteger"
                   msg="#{messages['validate.test.not.even']}"
                   server="true"
                   client="false"/>


-- or ---

Register the resource bundle in the faces-config.xml

<application>
    <locale-config>
      <default-locale>en</default-locale>
      <supported-locale>en</supported-locale>
      <supported-locale>fr</supported-locale>
      <supported-locale>de</supported-locale>
      <supported-locale>es</supported-locale>
    </locale-config>

    <message-bundle>org.apache.shale.usecases.view.Bundle</message-bundle>
</application>



> Add a custom validation example to the Use Cases example app
> ------------------------------------------------------------
>
>                 Key: SHALE-325
>                 URL: http://issues.apache.org/struts/browse/SHALE-325
>             Project: Shale
>          Issue Type: Improvement
>          Components: Validator
>            Reporter: Wendy Smoak
>            Priority: Minor
>             Fix For: 1.0.4-SNAPSHOT
>
>
> Add an example of using a custom validator to the Commons Validator  
> Integration section of the  use-cases example app.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to