File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes t:inputDate and custom validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "t:inputDate and custom validation" Watch "t:inputDate and custom validation" New topic

t:inputDate and custom validation

Steven Gollery

Joined: Nov 09, 2006
Posts: 18
Does anyone know if there is a way to override the error-checking that is done in Tomahawk's HtmlInputDate?

I've added a validator in the usual way:

<t:inputDate id="dateOfBirth" type="date" popupCalendar="true" value="#{bean.dateOfBirth}" binding="#{bean.dobInput}" validator="#{bean.dobValidator}"/>

The issue I'm running into is that if the user types in part of the date, but leaves a field blank or types in something non-numeric into the day or year fields, my validator is never called.

This is a problem for me because the design of the site requires gathering all the errors in a form that spans several tabs of a t:panelTabbedPane and presenting them to the user in a popup dialog. Also I don't want to present the generic error messages produced by the standard validators and t:inputDate to the user, so I need to add my own processing into the validation process.

Does anyone know if there's a way to hook into the t:inputDate validation process, or just to turn it off and handle validation myself?
chenhui Liu

Joined: Feb 05, 2008
Posts: 1
I agree. Here's the link:
subject: t:inputDate and custom validation
It's not a secret anymore!