4 Replies Latest reply on Sep 20, 2007 1:33 PM by matt.drees

    Error in documentation, or my understanding?

    matt.drees

       

      "Reference Documentation section 5.1.1.2" wrote:

      But ending the conversation loses any state associated with the conversation, including the document we are currently interested in! One solution would be to use an immediate render instead of a redirect:

      <page view-id="/editDocument.xhtml">
      
       <navigation from-action="#{documentEditor.update}">
       <rule if="#{documentEditor.errors.empty}">
       <end-conversation/>
       <render view-id="/viewDocument.xhtml"/>
       </rule>
       </navigation>
      
      </page>
      

      But the correct solution is to pass the document id as a request parameter:
      <page view-id="/editDocument.xhtml">
      
       <navigation from-action="#{documentEditor.update}">
       <rule if="#{documentEditor.errors.empty}">
       <end-conversation/>
       <redirect view-id="/viewDocument.xhtml">
       <param name="documentId" value="#{documentEditor.documentId}"/>
       </redirect>
       </rule>
       </navigation>
      
      </page>
      



      I haven't tested this, but this strikes me as wrong. Conversations by default don't end until after a redirect, right? If beforeRedirect="true" was specified, then the param would be necessary. But as it is, it shouldn't be necessary. Please, correct me if I'm wrong.