One implementation has been to subclass the Action object with another object (named 
something like OurGeneralAction).  All of your other Action objects, such as 
LogonAction, LogoffAction, DoSomethingAction then subclass OurGeneralAction.

Just prior to returning an ActionForward from your specific Actions (Logon, Logoff, 
etc.) you call a doBreadCrumb(String actionFwdName, HttpSession session) method that 
is contained in OurGeneralAction.

doBreadCrumb() looks in the session object for another class (perhaps called 
BreadCrumbs) that push or pop the actionFwdName from a stack.

That stack can then be used from a JSP using logic:iterate and bean:write to display 
the list of "bread crumbs".

There are a variety of details and complexities that are left out of this description, 
such as how you determine whether to push to, or pop from the stack, the exact text to 
display for each bread crumb, etc.  However, the general idea is represented.

On Thu, 20 September 2001, "Thinh Doan" wrote:

> 
> Would you please give me some ideas on how to implement a bread crumb scheme
> to keep track of where the user has been navigated around the application?
> Each menu has been implemented with a html:link with a forward name in the
> global-forwards definitions in struts-config.xml.
> 
> I'm planning to have a designate area on the template for this.  It'd nice
> to retrieve the navigation history w/o resorting to scriptlets.
> 
> Thank you very much for your suggestions.
> 
> Thinh

--
Steven Valin
[EMAIL PROTECTED]

Reply via email to