How to fetch the error message in bean?

My codes look as follow:

test.jsp

*********

...

<t:inputCalendar id="birthtday" value="#{myBean.birthday}" popupDateFormat="dd.MM.yyyy">

...

<h:messages layout="table" showDetail="true" />

...

test.java

*********

...

getBirthday()...

setBirthday()...

...

Normally if the typed birthday has format error such as 123.34.20034, the error message will be catched and print out by h:messages.

My question: is it possible to catch the error in the bean (mytest.java) class?

[579 byte] By [chinaboy624a] at [2007-10-2 20:47:50]
# 1
If you access the FacesContext you find a method called getMessages() Return an Iterator over the FacesMessages that have been queued, whether or not they are associated with any specific client identifier.
pringia at 2007-7-13 23:31:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Thanks for the answer. But my problem is, since the t:inputCarlendar has a build-in validator, it will catch the error ealier than I catch it in the bean.
chinaboy624a at 2007-7-13 23:31:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Why do you need to catch the error in the bean?
pringia at 2007-7-13 23:31:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...