[FYI] New article on Trinidad and mobile

2010-05-01 Thread Matthias Wessendorf
Hi, a new article on Trinidad/Mobile JSF development: http://twitter.com/lucb_/status/13146979264 -Matthias -- Matthias Wessendorf blog: http://matthiaswessendorf.wordpress.com/ sessions: http://www.slideshare.net/mwessendorf twitter: http://twitter.com/mwessendorf

Enums in selectItems

2010-05-01 Thread Jozef Dropco
Hi all, I have a little bit stupid question. I got this message: End of weekend: 'Tuesday' must be convertible to an enum from the enum that contains the constant 'Tuesday'. Do I have to write my own converter or what should I do. public enum DayOfWeek { MONDAY(Monday),

Re: Enums in selectItems

2010-05-01 Thread Anton Gavazuk
Hi Jozef, see it: public class EnumConverter implements Converter { public Object getAsObject(FacesContext context, UIComponent comp, String value) throws ConverterException { Class enumType = comp.getValueBinding(value).getType(context); return Enum.valueOf(enumType, value);

Re: Enums in selectItems

2010-05-01 Thread Jozef Dropco
Thanks a lot Anton, I've got it working now. Jozef On 1.5.2010 21:20, Anton Gavazuk wrote: Hi Jozef, see it: public class EnumConverter implements Converter { public Object getAsObject(FacesContext context, UIComponent comp, String value) throws ConverterException { Class