1 Reply Latest reply on Sep 15, 2009 12:31 AM by tony.herstell1

    jPDL re-installing its first seam object

    tony.herstell1

      Given this snippit


      <start-state name="entry">
           <transition name="start" to="getUsersDetails">
                <action expression="#{risingstars.registrationController.initUpdateRegistrationDetails}"></action>
           </transition>
      </start-state>
      
      <page name="getUsersDetails" view-id="/pages/user/updateUserDetails.xhtml" redirect="true" no-conversation-view-id="/home.xhtml">
           <description>Updating of User (#{risingstars.user.lastname}, #{risingstars.user.firstname})</description>
           <transition name="cancel" to="end" />
           <transition name="next" to="evaluateDetails"/>
      </page>



      I enter the jPDL and the bean has a User in scope... say (say id 123) auto created by



      @In(create=true) @Out(required=true)
       private User user;
      



      I then do this in initUpdateRegistrationDetails :


      this.user = (User) entityManager.createQuery("from User u where u.email = :email").setParameter("email", credentials.getUsername()).getSingleResult();



      Which forces the user in scope to no point to this new user (say id 456)


      What happens if by the time we get to the next page we have switched back to the original User (123).


      Why is this happening?