aspose file tools*
The moose likes JSF and the fly likes Different styles for stelectItems items Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Different styles for stelectItems items" Watch "Different styles for stelectItems items" New topic
Author

Different styles for stelectItems items

Arsineh Keshishian
Greenhorn

Joined: Apr 21, 2008
Posts: 19
Hi guys,

one question:

My code lookes like this:


The informationItems-List is a dynamic List, depending to the user it can have one or many items.

Every item in this list has an special attribte: one item can have the attribute active or inactive.
Depending to this attribute I would like to display the value in different styles.
If an item is activ I would like to display it in green, and if beeing inactiv in red.

How to give every item in the selectItems list a different style?
Does anyone has an idea?

Thank you!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

People ask this question surprisingly often.

The f:selectItems tag is a data definition tag, not a ui definition tag (which would be in "h:" instead of "f:" namespace). So it doesn't have a style or styleClass attribute.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Different styles for stelectItems items
 
Similar Threads
Select Item Styles
XSL: test for first and last occurence of template match
How to sort Map
Interesting tiles/struts making a menu question
Icefaces - PanelGrid align