struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Hill" <andrew.david.h...@gridnode.com>
Subject RE: concept for active tab
Date Fri, 06 Jun 2003 07:36:12 GMT
Im not using tiles and tiles tabs but my app does have navigation links that
need to be highlighted.
These links come from a config file (navigation-config.xml) , which
specifies such things as the links label key and the url to which it points
(usually an action - but often with appended url parameters). (Most of my
links are in a tree and the navigation renderer uses the navigation config
to construct a javascript tree widget)

To work out which link to highlight , the renderer will compare the request
path with whats in the config. It also does some comparisons based on the
appended parameters so it knows which link to highlight when several point
at the same base action path. It seems to work quite well.

-----Original Message-----
From: Dan Allen [mailto:dan@mojavelinux.com]
Sent: Friday, 6 June 2003 15:33
To: Struts-User List
Subject: concept for active tab


I have a site that has 6 or so main tabs.  I was thinking how I
would know which tab was active based on the page the user was
currently visiting.  I came up with one idea, but perhaps other
people have ideas as well.

In my tiles I set aside a variable name 'section' which by default
is "Home."  In each jsp page, I define the section variable to
equivalent to the section the page belongs to, else it will default
to "Home."  Then, when I render my master layout with the
navigation, I check to see if the section variable is equivalent to
the tab and if so, I display a highlighted tab.  Instead of putting
it in each jsp file I suppose I could make a mapping file of some
sort, but I haven't gotten that far yet.

Any other ideas?

Dan

--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Daniel Allen, <dan@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Real programmers don't change their wardrobe too often: there
are no clothes stores that are open at two o'clock in the morning.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message