This content has been marked as final.
Show 3 replies
-
1. Re: individual row color
ddeneka Jan 23, 2009 12:10 AM (in response to grabher)Hi,
try something like
<style type="text/css"> .plain-row { background-color: #FFFFCC; } .vip-row { background-color: #FFFFBB; } .admin-row { background-color: #FFFFAA; } </style> <rich:dataTable value="#{users}" var="user"> <rich:column styleClass="#{user.type}"> #{user.id} </rich:column> <rich:column styleClass="#{user.type}"> #{user.name} </rich:column> </rich:dataTable> <rich:jQuery selector=".plain" query="addClass('plain-row')"/> <rich:jQuery selector=".vip" query="addClass('vip-row')"/> <rich:jQuery selector=".admin" query="addClass('admin-row')"/>
but this way you are adding style clesses to each td element instead of adding it to tr
Regards, Daniel
-
2. Re: individual row color
ddeneka Jan 23, 2009 12:50 AM (in response to grabher)Ups,
ofcourse in this example no jquery is needed, just setting the styleClass
Regards, Daniel
-
3. Re: individual row color
grabher Jan 24, 2009 2:08 PM (in response to grabher)thx a lot. i did it with the style classes
<rich:column style="border:1px solid;background-color:#{tuser.admin ? '#fdf6a9':'#e0ffcf'};"></rich>
greets