• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Different styles for stelectItems items

 
Arsineh Keshishian
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic