  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | - Re: EntityManager inside ActionHandler | - Re: EntityManager inside ActionHandler 2007-07-18 - By szaccaria
Back For whom might be interested, I have found one solution...
| public class InformaInizioProcesso implements ActionHandler { | | private static final long serialVersionUID = 1L; | | public void execute(ExecutionContext arg0) throws Exception { | | Long idDocumento = (Long)arg0.getVariable("idDocumento"); | | Renderer renderer = (Renderer)Component.getInstance(Renderer.class); | EntityManager em = (EntityManager)Component.getInstance("entityManager", true); | | Documento doc = (Documento) em.createQuery("select distinct d from Documento d where d.id = :id").setParameter("id", idDocumento).getSingleResult( ); | | Contexts.getEventContext().set("doc", doc); | | renderer.render("/mail.xhtml"); | | } | | } |
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic &p=4065294#4065294
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode =reply&p=4065294 __ ____ ____ ____ ____ ____ ____ ____ ____ ____ jboss-user mailing list jboss-user@(protected) https://lists.jboss.org/mailman/listinfo/jboss-user
|
|
 |