users@glassfish.java.net

Re: JSF, selectOneMenu, enum and EnumConverter

From: Shreedhar Ganapathy <Shreedhar.Ganapathy_at_Sun.COM>
Date: Tue, 10 Oct 2006 22:17:05 -0700

Hi Ryan
Just a thought. Examples such as this might be useful additions to the
glassfish-samples project. What do ya think?

regards
Shreedhar

Ryan Lubke wrote:
> Antonio Goncalves wrote:
>> Hi,
>>
>> I'm using GLassfish v2b19 (JSF 1.2 then) and I want to fill a
>> selectOneMenu component with an enumeration. The Unified EL is
>> supposed to support enums but I couldn't make it work. I had a look
>> at the class EnumConverter but don't really know how to use it.
>>
>> Does anybody know how to fill a selectOneMenu with a enum ?
>>
>> Thanks,
>>
>> Antonio
> Hello Antonio,
>
> I've attached a simple example using a selectOneMenu with Enums. No
> need to worry about
> the converter, the framework takes care of that for you.
>
> Unjar the attached file to obtain the source and the packaged WAR file.
>
> To invoke the sample, deploy the WAR, and issue the following
> request: http://localhost:8080/enumselect/faces/Enum.jsp
>
> Hope this helps.
>
> -rl
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net