[jboss-user] [JBoss Seam] - Can't get s:selectItems and s:convertEntity to work

waynebagguley do-not-reply at jboss.com
Thu Apr 5 08:26:39 EDT 2007


I have this in my components.xml:

<component name="org.jboss.seam.ui.entityConverter">
  |     <property name="entityManager">#{em}</property>
  | </component>

...and this in a session bean:

@PersistenceContext
  | EntityManager em;

...and this on a page
<h:form>
  |     <h:selectOneMenu value="#{requestManager.item}" style="width:300px">
  |         <s:selectItems value="#{requestManager.items}" var="item" label="#{item.code} #{item.name}" />
  |         <s:convertEntity />
  |     </h:selectOneMenu>
  |     <h:commandButton id="proceed" value="Add" action="#{requestManager.addItem}"/>
  | </h:form>

And although the selection box contains all the correct items, when I submit the page I get this error:

ERROR [EntityConverter] Entity Manager not found

Clearly I'm missing something vital but I can't figure out what it is. There's nothing in the documentation or examples that has helped.

Thanks.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034987#4034987

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034987



More information about the jboss-user mailing list