[jboss-user] [JBoss Seam] - Error in documentation, or my understanding?

matt.drees do-not-reply at jboss.com
Wed Sep 19 04:02:10 EDT 2007


"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.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085897#4085897

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085897



More information about the jboss-user mailing list