2 Replies Latest reply on Aug 3, 2007 5:58 AM by pmuir

    Seam conversation propagation

    statelessbean

      I learn conversations and looking for somethink like that:

      if ("success")
      retirect to....
      else if("error"){
      end current conversation
      redirect to...
      }

      is this good idea?

       <navigation from-action="#{registerAction.register}">
       <rule if-outcome="success">
       <end-conversation/>
       <redirect view-id="/Registered.xhtml"/>
       </rule>
       <rule if-outcome="error">
       <redirect view-id="/Register.xhtml"/>
       </rule>
       </navigation>
      


      2. My page has menu on left side like:
      Main Page
      Emails
      Trade
      logout
      etc.

      each link opens only one page whitch has some info (each link = one SFSB), and here is my frustration, what type of scope to use.
      Users only clicks on this links.

      Conversations are for keeping some data for few pages, is this right? than this ins't good to set Scope=Conversation,
      Event is mostly to remoting, and isnt recomended to.

      And don't know witch scope to set, any help?
      Maybe better way is to set conversation scope but with short living time like 5min.

        • 1. Re: Seam conversation propagation
          statelessbean

          I mean

           <navigation from-action="#{registerAction.register}">
           <rule if-outcome="success">
           <redirect view-id="/Registered.xhtml"/>
           </rule>
           <rule if-outcome="error">
           <end-conversation/>
           <redirect view-id="/Register.xhtml"/>
           </rule>
           </navigation>
          


          • 2. Re: Seam conversation propagation
            pmuir

            Yes, that looks correct. Is there a problem?

            You really don't provide much information to determine which scope to use. My rule is always to use the shortest I can, then make it longer if I have to. I would recommend using stateless for any display stages (the hibernate 2nd level cache will cache for you).