5 Replies Latest reply on Apr 8, 2008 2:17 PM by josief

    Breadcrumb path in Seam

    josief

      Hi!


      I'd like to add a breadcrumb path on the top of my webapp. For those who don't know what is a breadcrumb, just have a look to the path on the top of this topic :
      Community > Forums > Seam Users > ...


      In my webapp, this breadcrumb path is not static, it must be dynamic since a web page could be accessed in several ways.


      I already have a solution using a breadcrumb backing bean which contains a navigation stack. In the pages.xml file, I launch a function in this backing bean to push the new page on the top of the navigation stack.
      My webapp is composed of several directories. If the user is in the directory A and click on a page of the directory B, using a menu item, the navigation stack is pop and the new page is added to the breadcrumb.


      The problem is that I'm not satisfied with this solution. Indeed, I can't make a page bookmarkable because the navigation stack doesn't appear in the URL link of the page.


      Do you have any idea for a simple solution to implement breadcrumb path in a webapp? Maybe using the conversation context to switch from a directory to an other?


      Any help would be very appreciated!!


      Thanks


      Adrien

        • 1. Re: Breadcrumb path in Seam
          dhinojosa

          Hi Adrien,


          Per documentation


          6.7.5. Breadcrumbs


          Breadcrumbs are useful in applications which use a nested conversation model. The breadcrumbs are a list of links to conversations in the current conversation stack:


          <ui:repeat value="#{conversationStack}" var="entry">
              <h:outputText value=" | "/> 
              <h:commandLink value="#{entry.description}" action="#{entry.select}"/>
          </ui:repeat>
          



          Now when you say. The problem is that I'm not satisfied with this solution. Indeed, I can't make a page bookmarkable because the navigation stack doesn't appear in the URL link of the page.  Can you clarify what you mean?  Are you not satisfied because you can't bookmark?

          • 2. Re: Breadcrumb path in Seam
            josief

            Daniel, thanks for your reply.


            The example shown in the documentation is not exactly what I'd like to do. In the documentation example, an entry is just an action that can be reached using the conversation context. I could be wrong, but it doesn't seem to have any notion of sequence between actions.


            For example :
            "Home > Manage users > Confirm User selection > Edit the selected user"
            If the user is in the Edit the selected user page, clicking on the "Confirm User selection" would act as the back button of the web browser.



            Daniel Hinojosa wrote on Apr 07, 2008 03:10 PM:

            Now when you say. The problem is that I'm not satisfied with this solution. Indeed, I can't make a page bookmarkable because the navigation stack doesn't appear in the URL link of the page.  Can you clarify what you mean?  Are you not satisfied because you can't bookmark?


            That's right. If I copy and paste the URL of a page to a blank page in my web browser, the breadcrumb path is empty. That could be confusing for the user.

            • 3. Re: Breadcrumb path in Seam
              josief

              Hummm... In fact, the solution given in the documentation could be used with a sequence of actions since it uses the conversation stack...


              But how to use the conversation stack? I made some researches, it seems to be used in the wiki example. A post on the jboss forum deals with it as well : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3946638#3946638


              I tried to display the conversationStack in my webpage but nothing happens? What should be done in order to display and access to the conversation stack?


              • 4. Re: Breadcrumb path in Seam
                jpviragine.jpviragine.gmail.com
                • 5. Re: Breadcrumb path in Seam
                  josief

                  Joao Viragine wrote on Apr 08, 2008 12:21 PM:


                  Adrien,

                  Look this:http://www.jboss.com/index.html?module=bb&op=viewtopic&t=90990


                  Wow! That's definitely what I need! I'm going to try it now!
                  Thank you!