views:

441

answers:

1

As far as I know there are two "kinds" of breadcrumbs.

The static/hierarchy one

  • Works like a stack
  • Entries are pushed when a user goes "deeper" into the site
  • Entries are poped when user goes "up" into the site
  • Is the same for all users (for a given page)
  • Shows location rather than history

A simple Example would be HOME -> BIG CATEGORY -> SMALL CATEGORY -> ARTICLE

The dynamic/historical one

  • Works like a queue
  • Entries are pushed at the end when a user goes to another page
  • Entries are removed from the front when the maximum size is reached
  • Is different for each user, since it is personalized.
  • Shows timeline/history instead of location.

A simple example would be SMALL CATEGORY -> HOME -> BIG CATEGORY -> HOME

The question is:

Are there any ready-made JSF component for these types of navigation?

+2  A: 

see primefaces, there are lot of components and you can find breadcrumb too http://www.primefaces.org:8080/prime-showcase/ui/breadCrumb.jsf

rachvela
Nice, but this is just the presentation part. I am interested in the back-end part that leverages JSF. I could easily create with jQuery/CSS an attractive breadcrumb for users.
kazanaki
@kazanaki: You're contradicting your own question. You were asking for a JSF component. But you're apparently more interested how to implement one yourself. Well, it's open source. Have a look. Trinidad has also one btw.
BalusC
@BalusC: I understand what you are saying and perhaps my question is not clear. Assume that I choose the primeface component. Then unless I am mistaked I still need to create a server-side Data structure manually that primefaces will ONLY Render. I expected something that plugs into FACEScontext and keeps track automatically of page redirects. Otherwise what do I gain from primefaces than a simple iterator and h:outputtext on this data structure? I don't want to implement anything myself. Less code is the best. But I fill that with the primefaces component I do not really gain anything.
kazanaki
You basically want a 3rd party filter or phaselistener which adds the current URL or viewid to some list in the session scope?
BalusC
@BalusC Yes something like this would be great!
kazanaki
@Rachvela My question was not clear. Sorry for this. Since it is my mistake I upvoted and accepted your answer.
kazanaki