quality@glassfish.java.net

Re: JSF 1.2 Converters stop working in JSF 2.0

From: Wouter van Reeven <wouter_at_van.reeven.nl>
Date: Mon, 2 Nov 2009 09:26:03 +0100

Hi again,


Just for your info, if I debug my application and put a breakpoint
inside the getAsObject method in one of my converters, the application
doesn't halt at the breakpoint. It looks like my converters are skipped
all together. Can anyone help me, please?


Thanks, Wouter

On Sat, Oct 31, 2009 at 01:33:43PM +0100, To quality wrote:
> Hi all,
>
>
> In the past weeks I have been preparing a presentation for the Dutch
> Java conference JFall 2009. In the presentation I will do a live demo
> migrating a JEE5 Web application to JEE6.
>
> In the JEE5 web app I have two Converters to convert an entry from a
> drop down list to an Object. They work perfectly ok. However, I have
> some troubles getting them to work in JEE6.
>
> I have removed my faces-config as is possible with JEE6. Instead I have
> annotated my converters like this
>
> @FacesConverter("constellationConverter")
> public class ConstellationConverter implements Converter {
> <code deleted>
> }
>
> In my xhtml file I have lines like this
>
> <h:outputLabel for="constellation" value="Constellation"/>
> <h:selectOneMenu id="constellation" value="#{jf2009mb.newSac.constellation}" converter="constellationConverter">
> <f:selectItems value="#{jf2009mb.constellations}"/>
> </h:selectOneMenu>
>
> If I omit the converter="constellationConverter" bit I get conversion
> errors. However, the constellation member in the newSac object always is
> null! There is another member in that same class that also needs a
> converter and it also always is null.
>
> Would anyone know what I am doing wrong?
>
>
> Thanks, Wouter
>
> --
> Veel shit is mest voor de toekomst.
> [Unknown Source]
>
> Skype: wvreeven
> Facebook: wvreeven
> Twitter: wvreeven
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: quality-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: quality-help_at_glassfish.dev.java.net

-- 
Veel shit is mest voor de toekomst.
[Unknown Source]
Skype: wvreeven
Facebook: wvreeven
Twitter: wvreeven