3 Replies Latest reply on Oct 11, 2010 7:25 AM by Leo van den berg

    oneToMany enums

    omid pourhadi Apprentice

      Hi,
      I created abstract Member Entity with enum class within it and a person class extends Member
      I want to create one to many relation between person and enumeration 
      after i persist person entity i get this error
      Conversion Error setting value {DIRECTOR, PRODUCER} for


      #{person.mtypes}





      .xhtml file



      <h:selectManyCheckbox  value="#{person.mtypes}">
      <s:selectItems   value="#{typeMembers}" var="mtype" label="#{mtype.label}" />
      <s:convertEnum></s:convertEnum>
      </h:selectManyCheckbox>



      Member.java



      @Enumerated(EnumType.STRING)
           private TypeMember mtypes;


      //getter / setter




      factory



      @Factory("typeMembers")
           public TypeMember[] TypeMembers(){
                return TypeMember.values();
           }