If your current pageN values map directly to JSPs, and you want the navigation through
those particular JSPs to be contained in the bread crumb stack, then I believe you
would need to map the pageN values to Actions that would handle the appropriate bread
crumb logic.
On Fri, 21 September 2001, "Thinh Doan" wrote:
>
> Thanks Steven. Your suggestion sounds pretty elegant. I now have a follow
> up question.
> On my pages, I use a lot of <html:link forward="pageN"> where pageN is
> defined in the <global-forwards>. Does that mean I now have to make all of
> these into an action and then have an action class for each link?
>
> Appreciate your help.
>
> Thinh
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 20, 2001 12:48 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Navigation history
>
>
> 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]
--
Steven Valin
[EMAIL PROTECTED]