dev@woodstock.java.net

calendar custom converter

From: Steven Bell <bell.steven_at_gmail.com>
Date: Fri, 26 Oct 2007 07:37:20 -0700

Hi,

I seem to be having a problem using a custom converter on the calendar
component. I used this converter before with a standard jsf text field and
it worked fine. Here's what I have in faces-config.

    <converter>
        <converter-id>customDateConverter</converter-id>
        <converter-class>
            com.expd.app.ap.ui.converter.DateConverter
        </converter-class>
    </converter>

This gives me an error telling me it can't convert a String to a converter.

    <w:calendar id="invoiceDate" label="Invoice/Doc Date:" required="true"
        selectedDate="#{payableBackingBean.invoiceDate}"
        converter="customDateConverter" dateFormatPatternHelp="" />

If I try it like this is just seems to ignore it (doesn't stop at break
points) and use the default converter.

    <w:calendar id="invoiceDate" label="Invoice/Doc Date:" required="true"
        selectedDate="#{payableBackingBean.invoiceDate}"
        converter="#{customDateConverter}" dateFormatPatternHelp="" />

It seems like I'm missing something simple here.

-- 
Regards,
Steven Bell