If the validation fails I will display the error message from the regExErrMssg in my validator class.
When I am trying to get the value for regExErrMssg in my validator class using component.getAttributes().get("regExErrMssg");
I am getting it as null. where as when I am trying to get the same for regularExpr I am getting the value.
Only difference between these 2 are in regularExpr I am giving the value directly where as in regExErrMssg I am trying to get the message from a resource bundle.
What could be the issue ? Any info would be really helpful.
Thanks in advance.
Joined: Oct 08, 2006
The bundle is only "evaluatable" during render response.
Change your validator so that it obtains the message from the bundly directly. You can use java.util.ResourceBundle API for this. In the f:attribute you can if necessary just pass the bundle key as string.