I think you can only use the "id" for the converter specified with the
faces-config.xml file with a "f:converter tag. This takes the id of the
converter as an argument.
If you are using the converter attribute, you need to use a method
binding expression like you mentioned below. I believe the example app
calendar shows how to do this.
-Venky
Bob Yennaco wrote:
>
>
> Steven Bell wrote:
>> Just an update. It seems to work fine when I put the converter on a
>> bean and access it as #{bean.converter}. Not sure if this is a bug
>> or something I was doing wrong in the first place.
> The calendar example in the woodstock example app specifies a method
> binding like this for the converter. It obviates the need for
> registering it via faces-config.
>
>>
>> I'll just keep it on the bean. If this does look like a bug and you
>> want me to do any more testing let me know.
>>
>> On 10/26/07, *Steven Bell* <bell.steven_at_gmail.com
>> <mailto:bell.steven_at_gmail.com>> wrote:
>>
>> Yes it does. I'm confidant that the converter works properly as
>> I've used it before. This is my first attempt at using a custom
>> converter with a woodstock component. I think my next step will
>> by to try and put the converter as a field in a backing bean and
>> use a #{ mybean.dateConverter} syntax to see if that works.
>>
>> The thing that seems strange to me is that when I use the
>> #{customDateConverter} syntax I don't get any errors, it just
>> seems like it ignores it. I keep getting the same errors and
>> messages as if it wasn't there, and it converts properly when I
>> use the default input format mm/dd/yyyy.
>>
>>
>> On 10/26/07, *Bob Yennaco* < Bob.Yennaco_at_sun.com
>> <mailto:Bob.Yennaco_at_sun.com>> wrote:
>>
>> Does com.expd.app.ap.ui.converter.DateConverter implement
>> javax.faces.convert.Converter?
>>
>> Steven Bell wrote:
>> > 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
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_woodstock.dev.java.net
>> <mailto:dev-unsubscribe_at_woodstock.dev.java.net>
>> For additional commands, e-mail:
>> dev-help_at_woodstock.dev.java.net
>> <mailto:dev-help_at_woodstock.dev.java.net>
>>
>>
>>
>>
>> -- Regards,
>>
>> Steven Bell
>>
>>
>>
>> --
>> Regards,
>>
>> Steven Bell
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_woodstock.dev.java.net
> For additional commands, e-mail: dev-help_at_woodstock.dev.java.net
>