0 Replies Latest reply on Nov 18, 2008 7:21 PM by David D

    Ending a conversation then redirecting to an existing conversation

    David D Newbie

      Hi,


      What i am trying to do :



      1. I have a sticky conversation (1) acting as a tab, that is, i store its cid somewhere

      2. I leave (propagation=none) this conversation (1) and begin a new (long running) one (2)

      3. I end the new one (2) and redirect to the first one (knowing its cid, 1)



      That works fine except that the conversation 2 is not removed (i can still see it in the debug page, and if i come back i can still see its data).



      Pages.xml :


          <navigation from-action="#{myform.cancel()}" evaluate="#{tabsManager.endAndRedirect()}" />
      



      Java (simplified) :


         void endAndRedirect()
          {
              facesManager.endConversation(false);
      
              // i tried to add this but no luck...
              facesManager.getCurrentConversationEntry().setRemoveAfterRedirect(true);
              Conversation.instance().setTimeout(10 * 1000);
              facesManager.setConversationTimeout(10 * 10000);
      
              facesManager.redirect(this.getPreviousViewId(), this.getPreviousCid());
          }



      By the way i was not able to change the timeout (does not change on the debug page). I ran into debugging but i am lost between Manager, Conversation, ConversationEntries, stack, etc... Methods are in several objects (with slightly different name), calling each other, and i don't know where is the real entry point of the API.


      Thanks


      David