This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JSF and the fly likes how to change css of f:selectItems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "how to change css of f:selectItems" Watch "how to change css of f:selectItems" New topic
Author

how to change css of f:selectItems

tony altaico
Greenhorn

Joined: Jan 31, 2009
Posts: 22
Hello

I am not able to change the css of f:selectItems inside rich:select. I can change CSS of rich:Select successfully unfortunately I do fail when I try to change f:selectItem. You can see the code.. Any help will be appreciated.

Best Regards
Altaico

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16158
    
  21

The f:selectItem(s) element is a data element, not a ui element. It doesn't support the style or styleClass attributes.

Aside from the lack of JSF-level support, while HTML docs do indicate that styles may be applied to the HTML <OPTION> elements that selectItems render to when used as data for selectOneMenu, I have never seen a browser that would honor them.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to change css of f:selectItems