This content has been marked as final.
Show 4 replies
-
1. Re: EntityQuery and Icefaces
marthoff Jan 18, 2008 6:40 AM (in response to marthoff)Hello again,
i found a solution for the problem (maybe).
First the concrete Exception is:Caused by: javax.el.ELException: /client/claim_list.xhtml @16,52 value="#{testLi st.dataModel}": Error reading 'dataModel' on type de.iseki.garantieext.card.Test List_$$_javassist_0 at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.ja va:76) at javax.faces.component.UIOutput.getValue(UIOutput.java:173) ... 69 more Caused by: java.lang.IllegalStateException: EntityManager is closed at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java :42)
So the reason was the closed EntityManager. My solution is to add:@In private EntityManager entityManager; @Override public EntityManager getEntityManager() { return entityManager; }
Do you think that it is good solution? Why is the EntityManager fetched in such a complicated way by the EntityQuery class (by using the PersistentContext)? -
2. Re: EntityQuery and Icefaces
pmuir Jan 20, 2008 7:27 AM (in response to marthoff)The EntityQuery isn't designed to be used with the PAGE context.
-
3. Re: EntityQuery and Icefaces
marthoff Jan 21, 2008 5:14 AM (in response to marthoff)Hello,
wouldn't it be preferable to use the EntityQuery within the PAGE scope? The seam reference says about the PAGE context:This is especially useful for functionality like clickable lists, where the list is backed
by changing data on the server side.
So the EntityQuery is the best suited class to manage data from the db on the server?
On the other hand it would be nice if the documentation says which framework class can be used in which context.
Greets,
Martin -
4. Re: EntityQuery and Icefaces
pmuir Jan 21, 2008 5:50 AM (in response to marthoff)wouldn't it be preferable to use the EntityQuery within the PAGE scope?
The EntityQuery isn't designed to be used with the PAGE context.
On the other hand it would be nice if the documentation says which framework class can be used in which context.
Open a JIRA issue.