Custom error messages
Viewing the jee5 docs I found this on component error messages:
A page author can override the error messages queued on a component by using the following attributes of the component's tag:
* converterMessage: References the error message to display when the data on the enclosing component can not be converted by the converter registered on this component.
* requiredMessage: References the error message to display when no value has been entered into the enclosing component.
* validatorMessage: References the error message to display when the data on the enclosing component cannot be validated by the validator registered on this component.
All three attributes are enabled to take literal values and value expressions. If an attribute uses a value expression, this expression references the error message in a resource bundle. This resource bundle must be made available to the application in one of the following ways:
* By the page author using the loadBundle tag
* By the application architect using the resource-bundle element in the configuration file.
Will this make it's way into JSC?
[1155 byte] By [
creonnoir] at [2007-11-26 9:35:46]

# 1
Hi there,
You may find some useful info in the "Convert and Validate Data" section of the tutorials at
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/index .jsp
especially the tutorial "Customizing a Standard Validator Message" at
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/cus tommessage.html
Hope it helps
K
# 2
Thanks for the tips, but I've already looked at the tutorials.The custommessage one is great if you only need the one input error message for your entire application. I'm looking for a more refined approach:
[login field] -> Please enter a login name
[password field] -> Please enter a password
Unfortunately I'm now parsing the fields manually and setting a standard text component to be visible with the error message I want, defeating the whole message-component-ease-of-use idea.
Will the new components be available in Creator soon? If not will I have a lot of issues (other than losing visual design) by including the jsf1.2 components/taglibs for the input and error components? Which, I admit, I'm not exactly sure how to do. I think I just need to add the jars to the project and hand-code the jsp file. Thanks!
# 3
I'm also facing a similar problem.
I tried replacing <ui:textField> with <h:inputText> using requiredMessage.
AppServer 8.2 chokes on requiredMessage, but ir works on AppServer 9. I guess the Studio Creator guys need to update <ui:textField> to allow for something like requiredMessage. Looks like we're playing the waiting game....