2 Replies Latest reply on Apr 11, 2007 5:08 PM by b.hutton

    Seam selectitems JSF control...

    b.hutton

      Is there a way to specify more than one EntityManager for use by this component?

      Has anyone done this yet?

      I have a project that makes use of more than one EntityManager accessing multiple databases.

        • 1. Re: Seam selectitems JSF control...
          pmuir

          Assuming you mean for s:convertEntity then you need to do, for each extra EntityManager:

          components.xml

          <component name="myConverter" class="org.jboss.seam.ui.EntityConverter">
           <property name="entityManager" value="#{myEntityManager}" />
          </component>


          foo.xhtml
          <h:selectOneMenu ...>
           <s:selectItems .... />
           <f:converter converterId="myConverter" />
          </h:selectOneMenu



          • 2. Re: Seam selectitems JSF control...
            b.hutton

            Thank you very much for the reply!

            This worked very well.