1 Reply Latest reply on Oct 30, 2009 8:40 PM by deanhiller2000

    end&begin conversation on seam xhtml page?

    deanhiller2000

      Well, I would like to end the conversation when anyone lands on query.xhtml page AND start a new one immediately AND I would like the ajax to work so it doesn't end/begin a conversation when ajax is done.  To work around the ajax, I am thinking about doing something like this...


              <!-- This is a bit complex, but we want to end the conversation
                  AND start a new one -->
              <page view-id="/secure/reviewer/query.xhtml">
                      <end-conversation/>
                      <action execute="#{bean.startConversation()}"/>
                      <navigation>
                              <rule if="#{bean.started}">
                                      <redirect view-id="/secure/reviewer/query2.xhtml"></redirect>
                              </rule>
                      </navigation>
                      
              </page>
      
              <page view-id="/secure/reviewer/query2.xhtml" conversation-required="true">               
                      
              </page>
      



      NOTE: I cannot begin the conversation in query2.xhtml obviously because the ajax requests then fail with conversation already started, cannot start another one(use join=true), but I don't like join in case I accidentally have another conversation going on....ALSO, I need to not allow going to query2 so that the previous conversation ends....


      any thoughts on this?  Is there an easier way?  It seems like this might be a common thing...I have ran into this a few times doing seam development and we always just worked around it until now when they really want query.xhtml to be the first page of the tab.


      thanks,
      Dean

        • 1. Re: end&begin conversation on seam xhtml page?
          deanhiller2000

          in fact, I think seam needs to add a feature for this like so



          <begin-conversation killPrevious="true"/>


          AND true should be the default.  for backwards compatibility have a components.xml setting of killPreviousDefault=true as most would want the default to be true I think.


          I would use this in nearly all of my begin conversation tags