Thanks for your response!
I tried overriding the find()-method with the following:
| @Override
| public Employee find() {
| EntityQuery eQuery =
(EntityQuery)Component.getInstance("employeeIdByEmploymentNumber");
| Long l = null;
| if(eQuery.getResultCount() > 0)
| l = (Long)eQuery.getSingleResult();
|
| getEntityManager().joinTransaction();
| Employee result = getEntityManager().find( getEntityClass(), (l == null ? getId()
: l));
| if (result==null) result = handleNotFound();
| return result;
| }
|
I then aimed the commandButton towards /viewEmployee.xhtml, and added to the -tag for it,
but it gives me LazyInitializationException and TransientObjectException.
I wasn't really sure on what to do with the overridden find method, since I'm not
really sure why my session is closed, and why it works when I reload the page.
Thanks
uke
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076750#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...