Are there any JSF components for implementing breadcrumbs navigation?

As far as I know, there are two β€œtypes” of breadcrumbs.

Static / Hierarchical

  • Works like a stack
  • Entries are clicked when the user "deepens" on the site.
  • Entries appear when a user navigates to a site
  • The same for all users (for this page)
  • Shows location, not history

A simple example would be HOME β†’ BIG CATEGORY β†’ SMALL CATEGORY β†’ ARTICLE

Dynamic / historical

  • Works as a queue
  • Entries are placed at the end when the user goes to another page.
  • Records are removed from the front when the maximum size is reached.
  • Different for each user, as he is personalized.
  • Shows a timeline / history, not a location.

A simple example would be SMALL CATEGORY β†’ HOME β†’ GREAT CATEGORY β†’ HOME

The question arises:

Is there a ready-made JSF component for these types of navigation?

+7
java jsf navigation breadcrumbs
source share
3 answers

see the price lists, there are many components and you can find http://www.primefaces.org:8080/showcase/ui/breadCrumb.jsf

+2
source share

I have the same problem! But I feel that the solution will be the one @BalusC talks about

Now I use breadcrumb only to get the current view path.

<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> 

I use .jsf as the Faces URL pattern and after viewid = / * .xhtml **, I had to fine-tune it, remove the .xhtml substring and add the .jsf line.

So, we need bean support that does the task of getting viewid (path) and puts it in an ordered list. It is also possible to use javascript:history.back() and history.forward ()!

0
source share

In this link you can find a suitable answer for your question. I hope this helps the next questionnaire

0
source share

All Articles