• 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

Menu link image change when I click the button

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I have these graphic buttons on my menu. They have 2 versions of them, 1 active and 1 inactive image. When I click on for instance the "forum" button, I would like my "inactive" image on that link, to become "active", and the "Index active" button, to become inactive.

This is how the buttons look in the menu:


When I click that link I want the
resources/graphics/Button-Forum-inactive.jpg
to become
resources/graphics/Button-Forum-active.jpg

and the currently used Index-active.jpg to become Index-unactive.jpg

Is there any "easy" way to do this?
 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've accomplished things like this before using the "rendered" attribute tied to a boolean value in a backing bean. For example, you could say:



That's how I've accomplished this before.

Hope that helps
 
ToT Ty
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes! That is perfect. A great way to solve it. I am having a few troubles making the myBean tho
 
reply
    Bookmark Topic Watch Topic
  • New Topic