This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Minni Sharma wrote:Hi Tim,
thanks a lot for your reply,but I have a constraint of using JSF 1.1 and I think "validatorMessage" is added from JSF 1.2 onwards ....is there any other way of doing the same
It's probably easier just to switch to JSF 1.2. The differences aren't that great, other than the added improvements. Besides, JSF 1.1 is pretty old now.
About the closest workarounds I can think of are these:
1. Override the message on a global basis - but that doesn't allow you to tell people WHICH control is annoyed.
2. Write a custom validator that provides a custom message. Which is not a good long-term solution. Plus, attaching per-control messages is going to be a real pain, since custom validators don't take parameters. You'd either have to do nasty bits of internal magic or implement the validator as a full-blown custom tag.