This content has been marked as final.
Show 2 replies
-
1. Re: Site Navigation History
tizzyd Nov 25, 2008 6:07 PM (in response to bartholodeus)Chris,
If I understand what you want, your use case would be like:
User starts at Home. (Home is visible in breadcrumbs.)
User clicks over to an organization.
User selects people, then Executives, each on a separate page.
Finally, they click on Bart Simpson.
Is that right?
So, if they click People, do they see ...People::Executives::BartSimpson::People (a la breadcrumbs) or just ...People?
The basic approach--from the "Seam in Action" book, is to use an Observer on the page event. Then, with each page firing, the observer bean stores a link in the hash. Just store a reference to the caller, from the ingestion, and you've got breadcrumbs. If you want the flatten approach--where going back down the tree removes that part from the breadcrumps is simple as well. Just compare the event coming back as the key in a session maintained map, and you can chop the end off when you jump.
As for the page caching, this issue really isn't yours. Use mod_rewrite to set up a mapping on the URLs, restructuring some items (like hanging .html tags). The browser sees the rewritten URL, and since it's not a CGI-style call, it will cache the page locally. Now, if you want some kind of cache mechanism on your side, storing chunks of your JSF trees for use, time to break out the JBoss Cache guide. But be specific about the real need you have. Because, a user's cache will be faster than yours.
. . . TizzyD -
2. Re: Site Navigation History
bartholodeus Nov 26, 2008 12:40 PM (in response to bartholodeus)Thank you for the detailed answer.
I wanted the flatten approach. Otherwise the breadcrumbs will quickly expand to much so I just cut the tree. I will try out your idea now.
Thx a lot, Chris