Some JSF notes

While working on the JSF tutorials, I observed a few things:

We can change the error messages for reqired fields by changing or creating our own and pointing to it from the faces-config.xml file. Messages for the properties we do not change will continue to be served form

In a custom Validator we can set the severity of error messages. I tried setting the severity of a error message to Severity.ERROR, but it resulted in a compilation error. The correct constant was FacesMessage.SEVERITY_ERROR. Hmmmm I would have thought Severity.ERROR was a better choice… especially since it already exists in the Severity class.

To use a custom converter we have to use the tag <f:converter …> but to use one of the default converters like the DateTimeConverter we use another tag <f:convertDateTime …> I think they should have just used the f:converter tag and supplied some default converters for us. This would have kept the tag library simpler and uniform.


One Response to Some JSF notes

  1. I do accept as true with all of the ideas you’ve introduced to your post. Click

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: