4 Replies Latest reply on Apr 9, 2011 6:51 PM by angela leon

    PickList persistence

    angela leon Newbie

      Hi everybody!!
      please I wanna know how can we persist the list of elements (target) choosen in a picklist. Please help out with this.


      Thanks a lot

        • 1. Re: PickList persistence
          Leo van den berg Master

          Hi,


          there is an EntityManager which has a method persist, you can call it in a for-each loop with each entry of the list as its parameter, ;-)


          Leo

          • 2. Re: PickList persistence
            angela leon Newbie

            Hi Leo!
            thanks a lot for your answer, now that I turned to work with a selectManyCheckBoxes (which i don't know if it is better or not) but I still dont know how to store the selected rows into my database!
            You suggested me to loop in order to store the list but how can I do that...Please If you can show an example I'll be veeery grateful :)


            Thanks

            • 3. Re: PickList persistence
              Leo van den berg Master

              Hi,


              Sorry to be so unpolite (that was the reason for a smilley in my answer). If you don't understand the basics of persisting somthing as simple as a numberof entities, you need some seriois study before you proceed with Seam. I recommend to look at Hibernate/JPA first (that's were the entityManager comes from).


              The Seam documentation (on your left on this page) a lot of matarial to study. Besides the docs, the Seam distribution contains a directory with alot of examples. And last but not least, there is an excellent book Seam in Action which will help you a lot.


              Leo


              • 4. Re: PickList persistence
                angela leon Newbie

                OK.


                Actually I'm very new in the whole Java environnement that's why I'm asking those kind of questions. 


                Thanks for your help