3 Replies Latest reply on Jun 4, 2008 1:08 PM by hasan

    PerNestedConversation

    marx3 Apprentice

      Is there possibility to get from nested conversation to it's parent conversation? Maybe via conversation stack?


      I have bean with @PerNestedConversation annotation and I need to get to it's instance in parent conversation.

        • 1. Re: PerNestedConversation
          hasan Newbie

          With @PerNestedConversation the component instance that exists in the parent conversation is invisible to its child conversations.


          Why are u using @PerNestedConversation if you want to acces the parent conversation?


          I think you should be using


          @Begin(nested=true)



          Here the nested conversation uses the same instance as that of parent



          • 2. Re: PerNestedConversation
            marx3 Apprentice

            I need to use two different instances - one is parent and second one is a child. Those are two different beans with different data.

            • 3. Re: PerNestedConversation
              hasan Newbie

              In that case. try this


              import org.jboss.seam.core.Conversation;
              
              String parentId = Conversation.instance().get.getParentId();
              ConversationEntry parentConversationEntry = ConversationEntries.getInstance().getConversationEntry(parentId);
              
              // play with ur parentConversationEntry here
              // parentConversationEntry.