File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » JSF
Bookmark "how to change css of f:selectItems" Watch "how to change css of f:selectItems" New topic

how to change css of f:selectItems

tony altaico

Joined: Jan 31, 2009
Posts: 23

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

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: how to change css of f:selectItems
It's not a secret anymore!