1

What i need to implement is something like a dynamic breadcrumb, so i decided to add the view id's in an array to throw it as an link in the respective view page. so i just wanted to know to get the previous view id's which i have visited. if #{view.viewId} gives me the current one, how to get the previous one.. i have tried by the way which is given the below link " Are there any JSF components for implementing breadcrumb navigation? "

<h:form id="breadcrumb">
                    <p:breadCrumb>
                        <p:menuitem value="#{bundle.Index}" action="/index?faces-redirect=true" immediate="true"/>
                        <p:menuitem value="#{view.viewId.substring(0, view.viewId.length()-6)}" url="#{view.viewId.substring(0, view.viewId.length()-6)}.jsf" ajax="false"/>

                    </p:breadCrumb>
                </h:form>

For which i really need to know how to retrieve the previous view id's. if there is any other way to achieve a dynamic bread crumb is really appreciable.

Community
  • 1
  • 1
Karthikeyan
  • 757
  • 3
  • 11
  • 25

1 Answers1

1

It is not quite clear, if you want to display the page hierarchy (this is what I would call breadcrumb navigation) or the page history.

If you look for the second, there are client side or server side approaches. See this related answer.

Community
  • 1
  • 1
Matt Handy
  • 29,855
  • 2
  • 89
  • 112