0 Replies Latest reply: Apr 15, 2012 11:58 PM by Brian Lavender RSS

    selectManyCheckbox and ManyToMany class relation

    Brian Lavender Newbie

      I have two classes: Artist and Track. They have a Many to Many relationship between them.


      I am trying to get the UI part working where the user can create an Artist and select the available Tracks to associate with the Artist. In order to create the project, I used Seam 2.2.2 and seam-gen. I dropped in the classes and then I executed "seam generate-ui". Then, I tried to add the selectManyCheckbox to "ArtistEdit.xhtml". The following is the snippet I added.



      <h:selectManyCheckbox value="#{artistHome.instance.tracks}" id="selectTracks" >

      <s:selectItems var="_track"

        value="#{trackList.resultList}" label="#{_track.title}" />




      If I try to create an Artist, it will show a list of checkboxes of Tracks to associate, but I get a conversion error when I try to commit the edit by selecting the "Save" button.


      Any tips on making this work?