Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best practice to manage the path breadcrumbs in Spring without Web flow

I am engaged in a project where I need to show path bread crumbs to the user like

Home (This is linked to home page) >> (page name)

and like

Home >> contacts

and in contacts like

Contacts >> create
Contacts >> edit

etc.

Is there a best practice how to do this in spring without he usage of spring web flow? I am not using spring web flow and simply using the spring MVC.

like image 280
user353430 Avatar asked May 29 '10 05:05

user353430


2 Answers

I'm not sure why you'd have to do this in Spring if you're not using Spring MVC.

Depending on the site's structure and the URL structure, you might want to parse the URL into something readable.

Another option is to have some sort of push/pop mechanism but since browsers have a back button which does not signal the server this is often a recipe for disaster.

like image 92
Rolf Avatar answered Oct 20 '22 15:10

Rolf


I'm not sure there is any universal solution for breadcrumbs. Here are a few variants:

  • use the URL structure. With spring mvc this is actually a very good option, since it (since 2.5) replies a lot on nice, structured URLs
  • have each page (view) identify its own path in the breadcrumb (via a request parameter). It's not
  • place current steps in session. This would break if multiple tabs/windows are used, so you will have to use a windowId.. and essentially roll-out a "crippled" webflow.
like image 42
Bozho Avatar answered Oct 20 '22 16:10

Bozho