5 Replies Latest reply on Sep 12, 2008 10:19 AM by asiandub

    pageflow <end-conversation> vs. @converstational

    asiandub
      hello,

      [sorry for no formatting, i just keep on getting stupid errormessages telling me that i cannot have < p a g e > in my posting. removed it, but nothing changed.]

      i have a problem understanding the following behaviour of seam.

      (1) I have a pageflow in a long running conversation, associated with a controller in conversation scope. The controller is annotated with @Conversational

      (2) The pageflow has - as the very last page - a confirmation page

           <page name="finishDeactivation" view-id="/x/y/z.xhtml">
                <end-conversation />
                <redirect />
           </page>
           
      (3) The confirmation page is accessing a controller field with an EL expression #{controller.field.name}

      What happens is that I get an exception as long as the controller is annotated with @Conversational. If I remove the annotation, everything works fine.

      My interpretation is that

           <page name="finishDeactivation" view-id="/x/y/z.xhtml">
                <end-conversation />
                <redirect />
           </page>

      ends the conversation before the page gets rendered.

      I don't understand why.

      Furthermore, if I remove the annotation, (but not the <end-conversation /> tag, I still have access to the correctly initialized field in the controller. Why's that? I would expect that a finished conversation would result in a fresh instance of the controller.

      Hope someone can clarify...

      Many thanks,
      Jan