4 Replies Latest reply on Aug 10, 2007 5:20 AM by Pete Muir

    how to "return to a conversation"

    henrik lindberg Apprentice

      Is there a way to perform "return to whatever page was shown in a conversation when a nested conversation started" - i.e. I come to a nested conversation from several different pages in long running conversation, and I want to be able to let the user hit a "return to where you were" button.

      Any suggestions on how to do that?

        • 1. Re: how to
          Paul Pantages Novice

          Hi henrik,

          I have been doing this by passing a parameter when the nested conversation is started. The backing bean (SFSB in the nested conv. context ) grabs the parameter and keeps it in a String var for later use.

          I am hard coding the outcomes,
          If you find a better way, please lmk.

          <s:button
           value="Details"
           propagation="nest"
           action="#{eventEditor.showEventDetails}" >
           <f:param name="seqNum" value="#{alarmRow.sequenceNumber}"/>
           <f:param name="ctx" value="servicealarmdetails"/>
          </s:button>
          


          @RequestParameter
          private String ctx;
          
          public String showEventDetails()
          {
           jsfOutcome = ctx;
          
           if ( jsfOutcome == null)
           jsfOutcome = "someNonNullDefault";
           ...
           ...
          }
          
          @End(beforeRedirect=true)
          public String done()
          {
           return this.jsfOutcome;
          }
          



          • 2. Re: how to
            henrik lindberg Apprentice

            I am using a combination of page parameters and ui:param to pass the viewid of the caller around.

            I then use a s:link where the view is set with a #{param['backLinkId']} which works great, but I would prefer something less hardwired.

            In fact, I pass two parameters around (as I support two levels of 'getting back').

            I will probably end up implementing a general purpose breadcrumb bean.

            • 3. Re: how to
              Paul Pantages Novice

              Hi henrik,

              Maybe the Conversation and/or ConversationStack classes could help with this?

              http://docs.jboss.com/seam/1.2.1.GA/api/

              • 4. Re: how to
                Pete Muir Master

                 

                "henrik.lindberg" wrote:
                I am using a combination of page parameters and ui:param to pass the viewid of the caller around.


                This sounds very similar to the pattern we are using in seam-gen to do this (obviously, our preferred pattern). Get Seam CVS, create a project with seam-gen and take a look.