8 Replies Latest reply on May 29, 2007 2:31 AM by kooudy

    conversations, nested conversations

    kooudy

      Hello,
      I have a conversation which starts at page A, then I start nested conversation. At the end of the nested conversation I want to return to the parent conversation but other page than A.

      Question1: it is possible to return to the parent conversation, but to other page (from which was started nested conversation)?

      Question2:
      I have troubles with ending conversation.
      Annotation <end-conversation/> doesn't end conversation immediately.

      Thanks for help

        • 1. Re: conversations, nested conversations
          kooudy

          Another question:
          It is possible to acquire parent conversation (within nested conversation) and set viewID?

          Something like this:

          Conversation c = Conversation.instance();
          c.getParent().setViewId("/detail.jsp");


          I don't know how to get parent conversation.

          I need to return from nested conversation to other page than I came from.

          please help

          • 2. Re: conversations, nested conversations
            kooudy

            Another question:)

            How to acquire parent conversations pageflow, seam component:

            Pageflow.instance();


            returns pageflow for actual conversation.

            Need to reposition for parent pageflow.
            Thanks

            • 3. Re: conversations, nested conversations
              breuniga

              Did you find solutions for your questions?

              • 4. Re: conversations, nested conversations

                Seam provides a stack of your conversations.

                @In List conversationStack;

                Methods of interests are conversationEntry.destroy() and conversationEntry.select()

                • 5. Re: conversations, nested conversations

                   

                  @In List<ConversationEntry> conversationStack;
                  


                  • 6. Re: conversations, nested conversations

                    YOu can also do

                    
                    @In Conversation conversation;
                    
                    conversation.redirectToParent();
                    


                    • 7. Re: conversations, nested conversations
                      kooudy

                      Hi,
                      my solution isn't best but it works: with component Conversation I end up nested conversation, then Redirect to required view a then define transitions for previous node, or reposition pageflow to new view (node):

                      public void endAndRedir() {
                       Conversation.instance().endBeforeRedirect();
                       Redirect.instance.setViewId("/projectDetail.jsp");
                      
                       //Pageflow.instance.reposition("detail");
                      }
                      


                      I commented out last line, because nested conversation doesn't ended.

                      So I have to define transitions for previous node (/search.jsp, where pageflow is still situated, after redirect) even if this view doesn't have transitions (like new view /projectDetail.jsp).

                      Hopefully helps.

                      Hope you find better solution and post it.

                      • 8. Re: conversations, nested conversations
                        kooudy

                        I have forgot:

                        Conversation.pop();


                        before

                        Pageflow.instance.reposition("detail");
                        


                        to reposition parent pageflow.