• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need an idea on Navigation link selection color

 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a page with left side navigation menu, in this menu we are displaying some categories from the database, each one is linking to corresponding page. here When we clink on any link, that name with the link should be changed. that means the user can identify that he is in that particular category's page.

If you see this link
selected category with color change, you can get the idea what I mean to say. In this page the "kids" is selected (forget about the underneath 3 subcategories), here I want to get the idea how dynamically changed the "kids" color when we click on this.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please take the time to choose the correct forum for your posts. This forum is for questions on JSP.

For more information, please read this.

This post has been moved to a more appropriate forum.
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please see the following code which I have. i.e. the code behind what I sent you the link.



here class="current" is given to Kids category, that means the kids is changed the color. If I click on the "Craft", then how to set the class="current" to this?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well you would have to add the class="current" to that link.

Build functionality in your Java code that generates the menu and spit out what you need when you are on that page.

Eric
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eric,

What I'm thinking is, I will create a java POJO class with (name and className fields) and I will create the new object for each field( Craft, Kids, etc) in the list returned from db.
Ex: -
in the Action class

Then I use this listForJSP list object to display the categories with the corresponding style class like



is that works?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic