Tim Holloway wrote:Yes, you can add your own custom overrides to the stock JSF message templates. If memory serves, you designate a properties file in the faces-config.xml file.
You can also override both the "required" and "validation failed" messages on a per-control basis like so:
In this particular case, "messages" is a backing bean I presumably constructed from a message bundle.
Hi Tim,
I copied the default Messages.properties file into my src directory and put it in a package called messages. In the faces-config file I specified it as a message bundle named messages.Messages and it worked. I find it strange though that a property file like this has to be contained in a
java package as opposed under the optional JSF resources folder that you can put in WEB-INF. That resources folder is great for css and images.
ps. I didn't know about the validatorMessage attribute, that's handy.
Thanks