users@javaserverfaces.java.net

Tomahawk inputDate and custom converters/validators

From: Steven Gollery <sgollery_at_cadrc.calpoly.edu>
Date: Wed, 30 May 2007 09:27:43 -0700 (PDT)

I'm using t:inputDate in several pages and have run into problems trying to
integrate it into my own process for presenting errors to the user. As far
as I can tell, t:inputDate is not participating in the usual JSF conversion
and validation process. In a page, I set an inputDate to use my own custom
converter, like this:

<t:inputDate id="dateOfBirth" type="date" popupCalendar="true"
value="#{editPerson.dateOfBirth}"
                  binding="#{editPerson.dobInput}">
   <f:validator validatorId="dobValidator"/>
   <f:converter converterId="dobConverter"/>
</t:inputDate>

The converter and validator classes are set up like this in
faces-config.xml:

  <validator>
          <validator-id>dobValidator</validator-id>
          <validator-class>backingBeans.DOBValidator</validator-class>
  </validator>
  
  <converter>
     <converter-id>dobConverter</converter-id>
     <converter-class>backingBeans.DOBConverter</converter-class>
  </converter>

But DOBValidator.validate, DOBConverter.getAsObject and
DOBConverter.getAsString are never called.

I've written other validators and converters that work fine, but Tomahawk
inputDate doesn't appear to use the JSF validator/converter framework.

Does anyone have any experience attaching custom validators or converters to
t:inputDate? If so, how did you make it work?

Thanks in advance,

Steven Gollery


-- 
View this message in context: http://www.nabble.com/Tomahawk-inputDate-and-custom-converters-validators-tf3841436.html#a10877339
Sent from the javaserverfaces users mailing list archive at Nabble.com.