Best practice for managing path patterns in Spring without a web stream

I participate in a project where I need to show road breadcrumbs to a user, for example

Home (This is associated with the main page) β†’ (page title)

And How

Home β†’ Contacts

and in contacts like

Contacts β†’ create | Contacts β†’ edit

and etc.

Is there any best practice how to do this in spring without using spring web stream? I do not use spring web stream and just use spring MVC.

+7
spring spring-mvc breadcrumbs
source share
3 answers

I'm not sure why you need to do this in Spring if you are not using Spring MVC.

Depending on the structure of the site and the structure of the URL, you may need to parse the URL into something readable.

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

+1
source share

I am not sure that there is a universal solution for crackers. Here are a few options:

  • use the URL structure. With spring mvc, this is actually a very good option, since it (starting with version 2.5) has a lot to do with beautiful structured URLs.
  • so that each page (view) identifies its own path in the palette (via the request parameter). Is not
  • Post current steps in a session. This would break if multiple tabs / windows are used, so you have to use windowId .. and essentially profiling outside the crippled WebFlow.
+1
source share

This kind of crumbs is sometimes called the homeward navigation path .

If you can capture the site layout in XML, then XSL can be used to create breadcrumbs. The same XML site layout document can also be used to create side navigation menus.

See Also: Dividing breadcrumbs (Homeward path) navigation from content using XML / XSL

+1
source share

All Articles