[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-682) seam-gen edit page doesn't support saving after deletion

Gavin King (JIRA) jira-events at jboss.com
Mon Jan 22 12:44:52 EST 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-682?page=all ]

Gavin King updated JBSEAM-682:
------------------------------

      Component/s: Tools
                       (was: Framework)
    Fix Version/s: 1.1.5.GA
         Assignee: Gavin King

> seam-gen edit page doesn't support saving after deletion
> --------------------------------------------------------
>
>                 Key: JBSEAM-682
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-682
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Christian Bauer
>         Assigned To: Gavin King
>            Priority: Minor
>             Fix For: 1.1.5.GA
>
>
> The Delete button on the seam-gen generated edit page calls home.remove(), which effectively detaches the deleted entity. Since the edit page is redisplayed, and the detached entity is rendered in the form, clicking Save results in an exception:
> Caused by: org.hibernate.PersistentObjectException: detached entity passed to persist: org.jboss.seam.wiki.core.Foo
>         at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:79)
>         at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
>         at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618)
>         at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592)
>         at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596)
> Overriding the persist() method and using em.merge() would solve this temporarily, I think it is better if the generated edit page would redirect to the list page after deletion.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list