• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Composite Component: SelectOneMenu (enum)

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I´m trying to create a simple composite component with a selectOneMenu... It is really simple:


So, the problem is when I´m trying to pass the converter! That is an ENUM converter (extends EnumConverter with @FacesConverter(value = "tipoCampoConverter") annotation)

The error is: javax.el.ELException: Cannot convert tipoCampoConverter of type class java.lang.String to interface javax.faces.convert.Converter
 
Saloon Keeper
Posts: 28750
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If #{cc.attrs.listValue} is attached to an enum property, it will fail because "selectItems" requires a collection (List or array) of SelectItem, not a single enum, You would have to construct a SelectItem list with a SelectItem entry for each of the enum values that are selectable for this control.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic