• Post Reply Bookmark Topic Watch Topic
  • New Topic

dynamically changing styleclass of a outputLink

 
Sushma Sharma
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I want to change the style class of <hutputLink> on the basis of
condition. Suppose, the condition is



is there something like jstl if in jsf, so that first I can check the
condition and set a variable, then specify the variable as the value of
styleClass to outputLink? or there is any other way round to achieve
this?

Regards,
Sushma
 
Rick Beaver
Ranch Hand
Posts: 464
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two options:

1 (from memory, may differ lightly but the intent is clear)



2 - in code



Then in MyBean.getTheStyleClass()

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!