Sorry I posted the wrong beans code (it was the one after some tests :P).. this is the right one:
| @Name("homepageHelper") | @Scope(ScopeType.CONVERSATION) | public class HomepageHelper implements Serializable { | | private Gruppo gruppoEdit; // gruppo usato per l'aggiunta o la modifica | | public Gruppo getGruppoEdit() { | return gruppoEdit; | } | | public void setGruppoEdit(Gruppo gruppoEdit) { | this.gruppoEdit = gruppoEdit; | } | | public void preparaAggiuntaGruppo() { | Gruppo g = new Gruppo(); | g.setContatto(loggedUserManager.getLoggedUser()); | | setGruppoEdit(g); | } | | public void salvaGruppo() { | // Se sono in modifica | if (entityManager.contains(getGruppoEdit())) { | entityManager.merge(getGruppoEdit()); | } else { | entityManager.persist(getGruppoEdit()); | } | entityManager.flush(); // Salvo | } | | ... | Demetrio View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078124#4078124 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078124 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user