Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSF and the fly likes rich faces select component dropdown only highlights item when rolling over text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "rich faces select component dropdown only highlights item when rolling over text" Watch "rich faces select component dropdown only highlights item when rolling over text" New topic
Author

rich faces select component dropdown only highlights item when rolling over text

Brian Wheeler
Ranch Hand

Joined: Dec 06, 2010
Posts: 30
Hey everybody!

I'm using richfaces 4.2.0 and have a problem with the rich:select component. Here is the link to the demo. Richface Select Demo

In this demo, notice when you do a drop down and rollover anywhere in the row, it hightlights the item. However, when using rich:select component on my application, it would only highlight an item when I rollover the actual text on that row.

Does anyone know why this is happening?

Thanks in advance!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

'Cause they got style!

Seriously, Rich Faces allows extensive customization of the appearance of its components. If you read the manual page for the rich:select, it should contain a table of the different style classes it uses and what parts of the control are affected. To get the highlight, you'd pair that with a CSS ":hover".


Customer surveys are for companies who didn't pay proper attention to begin with.
Brian Wheeler
Ranch Hand

Joined: Dec 06, 2010
Posts: 30
Hey Tim,

I'm using this component out of the box without modifying the style.

Here's an update though. I am using the rich:select component along with many h:inputtext components on the same page. I noticed that when I removed all of the h:inputtext, rich:select worked perfectly just like how the demo showcased it. Any ideas why this might be?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

I can't say a whole lot without actually seeing your application, but the background highlighting on the example dropdown list is provided by the "rf-sel-sel" class.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: rich faces select component dropdown only highlights item when rolling over text
 
Similar Threads
Accessing a UI component in a managed bean
Select and expanding widths
JSF Tree Component using AJAX
Richfaces 4 - Drag and drop listener when failed drop
Richface/Primefaces Elements are not rendered