2 Replies Latest reply on Apr 24, 2007 3:11 PM by Andrew

    Nested conversation ending problem

    Andrew Apprentice

      I have an AJAX'd (A4J) page that shows a dialog. There is a link that opens that dialog. The action of that link is annotated with

      @Begin(ifOutcome="success", nested=true)

      The "OK" button of the dialog (a4j:commandLink) calls:
       public String applyChanges()...

      There is no navigation for "success", so the view should stay on the same page and the parent conversation should resume. The page that I'm on is in pages.xml:
       no-conversation-view-id="/pages/jobManagement/tasks.xhtml" />

      What is happening is that "Manager.endConversation(boolean)" is called, and that method calls "setLongRunningConversation(false);". After this, the SeamPhaseListener gets to the "Pages.enterPage" method. It finds my page from the pages.xml definition and "Manager.instance().isLongRunningConversation()" returns false. The Manager then redirects to the "no-conversation-view-id".

      Why is this happening? What I think should be happening:

      1. @End encountered
      2. Manager.endConversation called
      3. Manager should notice that it is ending a nested conversation and pop the conversation
      4. Manager should resume the parent conversation (isLongRunningConversation() should still be true)
      5. Pages should then be happy and the view re-rendered

        Is this a shortcoming or a bug, or is there something I am missing? (FYI, I tried both "beforeRedirect=false" and "beforeRedirect=true", and it didn't make a difference in the behavior of the Manager code.

        Thanks for any help.

        Seam version 1.1.6 GA
        Ajax4Jsf 1.1.0
        Facelets 1.1.11