3 Replies Latest reply on Aug 20, 2007 9:01 AM by ellenzhao

    Conversation question

    amitev

      Hi all! I have the following code

      @In @Out
      private User user;
      
      @Begin(nested=true)
      public void begin() {
      
      }
      
      @End
      public void someAction() {
       ............
       Conversation.instance().pop();
      }
      


      The question is - after i call Conversation.instance().pop(); and return to the parent conversation, will that mean that the User object will be outjected to the parent conversation after the nested conversation ends?

        • 1. Re: Conversation question
          ellenzhao

          making your user field managed guarantees any parent conversation will have the user object available. It's as simple as just write a getter and setter for your user field. And the <s:convertEntity /> works smoothly if your user object is managed.....

          • 2. Re: Conversation question
            amitev

            Ehm. How this is related to my question?

            • 3. Re: Conversation question
              ellenzhao

              Sorry for the confusion...I guessed you wanted to use the user object in the parent conversation, so I just posted a possible way to use the user object in any of the parent conversations which your current conversation has (even not the direct parent), as long as there is a "User user" field in your conversation bean.