0 Replies Latest reply on Nov 26, 2009 4:57 PM by schnulla

    The Seam registration example

    schnulla

      Hello Community,


      I have written some register user stuff similar
      to how it was done in the registration example.


      No I have two questions:


      When I revisit my register.xhtml page AFTER I
      have registered a user all fields are populated
      with the previous registration values.


      1. I guess because User.java uses @Scope(SESSION)?


      So when I press the submit button again I get the




      org.hibernate.PersistentObjectException: detached entity passed to persist



      2. Is that because the same user entity is attempt to be persisted again?


      Any suggestions how to solve this problem nicely?
      Can I invalidate or reset the user enity somehow
      when the register.xhtml page is revisited?


      Or should I change the @Scope to page context?


      Please let me know what a good design would be.


      Thanks