Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to conditionally change text color?

 
Ronnie Phelps
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Would any of you guys happen to know how I can conditionally change the color of text that's within a ListView?
 
Ronnie Phelps
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually. I forgot to mention that it is a wicket org.apache.wicket.markup.html.list.ListView.
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can add a SimpleAttributeModifier. For an example how to use alternating color in a list have a look at http://apache-wicket.1842946.n4.nabble.com/change-tr-background-color-when-ListView-iterate-td1894024.html
 
rajeev yadav
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use SimpleAttributeModifier to change the text color.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic