[jboss-user] [JBoss Seam] - Multiple <s:convertEntity /> from different persistence mana
jarkko@jab.fi
do-not-reply at jboss.com
Mon Oct 29 18:32:27 EDT 2007
Hello,
I'm trying to figure out how use different entity managers with s:convertEntity.
This is from Admin page which uses the adminEntityManager (EM without any restriction filters).
anonymous wrote :
| <h:selectManyListbox value="#{unit.manager}" size="4">
| <s:selectItems value="#{managers}" var="yp" label="#{yp.name}" />
| <s:convertEntity />
| </h:selectManyListbox>
|
Now, this fails because the s:convertEntity has been configured to use (because it's also used elsewhere/other pages) restrictedEntityManager in components.xml.
Is there a way to use "multiple" EntityManagers aka have more than one entityConverter? I couldn't find a way to do that.
anonymous wrote :
| org.hibernate.TransientObjectException: The instance was not associated with this session
| at org.hibernate.impl.SessionImpl.getIdentifier(SessionImpl.java:1375)
| at org.jboss.seam.persistence.HibernatePersistenceProvider.getId(HibernatePersistenceProvider.java:51)
| at org.jboss.seam.framework.EntityIdentifier.(EntityIdentifier.java:15)
| at org.jboss.seam.ui.EntityConverterStore.put(EntityConverterStore.java:61)
| at org.jboss.seam.ui.EntityConverter.getAsString(EntityConverter.java:63)
|
components.xml:
| <component name="org.jboss.seam.ui.entityConverter">
| <property name="entityManager">#{restrictedEntityManager}</property>
| </component>
|
|
| <core:managed-persistence-context name="restrictedEntityManager">
| <core:filters>
| <value>#{disabledFilter}</value>
| </core:filters>
| </core:managed-persistence-context>
|
| <core:managed-persistence-context name="adminEntityManager">
| </core:managed-persistence-context>
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100030#4100030
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100030
More information about the jboss-user
mailing list