I added a custom validator on the inputCalendar component. In particular, the validator I used was the LaterThanValidator from Hans Bergsten's JSF book. When there is no validation problem everything is fine. When there is a validation problem the validator sets a faces message in a ValidatorException. I would like to display that message next to the field in question so I have a <h:message for="mend"/> tag there.
But the inputCalendar seems to swallow up the ValidatorException and throw a ServletException instead: [13 Apr 2005 16:10:04,366] ERROR <org.apache.struts.taglib.tiles.InsertTag -> InsertTag.java:920> [TP-Processor2] - ServletException in '/SearchHeader.jsp': Expected submitted value of type Date for component : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /search.jsp][Class: javax.faces.component.UINamingContainer,Id: header][Class: javax.faces.component.html.HtmlForm,Id: _id19][Class: org.apache.myfaces.custom.calendar.HtmlInputCalendar,Id: mend]} org.apache.jasper.JasperException: Expected submitted value of type Date for component : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /search.jsp][Class: javax.faces.component.UINamingContainer,Id: header][Class: javax.faces.component.html.HtmlForm,Id: _id19][Class: org.apache.myfaces.custom.calendar.HtmlInputCalendar,Id: mend]} The id of the component (mend) is correct. What happened to my ValidationException? It's not in the stack trace and the message 'Expected submitted value of type Data for component' is a message from inputCalendar component, not the message my validator threw. -- Rob @objectsource.org