This content has been marked as final.
Show 6 replies
-
1. Re: rich:dataTable row color?
maksimu Feb 4, 2009 10:10 PM (in response to seamnewbie)DataTable has attributes like onRowMouseOver, onRowMouseOut. Try them out.
-
2. Re: rich:dataTable row color?
seamnewbie Feb 5, 2009 11:29 AM (in response to seamnewbie)I think I figured it out. I just add the following code to each of the columns:
styleClass="#{dataTableItem.status}"
Then in my css I have this code for each status:.Proposed{ background-color:fuchsia; }
Works well, but needs to be applied to each column. -
3. Re: rich:dataTable row color?
maksimu Feb 6, 2009 12:54 AM (in response to seamnewbie)But how do you change color when you mouseover that row/cell?
-
4. Re: rich:dataTable row color?
ilya_shaikovsky Feb 6, 2009 8:00 AM (in response to seamnewbie)look to richfaces-demo online. there source code for such highlighting. dataTable sample.
-
5. Re: rich:dataTable row color?
maksimu Feb 6, 2009 12:35 PM (in response to seamnewbie)How about changing the color of the row with different expressions. For example if i have a list of cars and if the color of a car is RED the row should be red and if the car is blue the color should be blue.. Is it possible?
-
6. Re: rich:dataTable row color?
tsurdilovic Feb 6, 2009 7:38 PM (in response to seamnewbie)You could add onmouseover and onmouseout on each of your <rich:column> components, for example:
<rich:column onmouseover="this.style.backgroundColor='#{car.hexColor}'" onmouseout="this.style.backgroundColor=''"> <h:outputText value="#{car.make}" /> </rich:column> <rich:column onmouseover="this.style.backgroundColor='#{car.hexColor}'" onmouseout="this.style.backgroundColor=''"> <h:outputText value="#{car.model}" /> </rich:column> <rich:column onmouseover="this.style.backgroundColor='#{car.hexColor}'" onmouseout="this.style.backgroundColor=''"> <h:outputText value="#{car.color}" /> </rich:column>