You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Tamas Fabian <ta...@adnovum.hu> on 2007/10/19 13:35:15 UTC
[Trinidad] applying styles
Hello everybody!
I have a table which looks like this:
<tr:table rows="#{Bean.rows}"
value="#{Bean.dataModel}"
first="#{Bean.startIndex}"
rangeChangeListener="#{Bean.saveFirst}"
var="currrent"
rowBandingInterval="1"
width="100%">
<tr:column styleClass="tblCenter w5">
<f:facet name="header">
<tr:outputText value="Status"/>
</f:facet>
<h:graphicImage value="#{Bean.statusImage}"
title="#{current.status}" />
</tr:column>
...
...
I also have a skinning file configured, which contains this two lines:
af|column::cell-text{background-color:#E1E1E1}
af|column::cell-text-band{background-color:#F0F0F0}
So I have a table with a column, which contains images, the
background-color of the rows are bending with the colors I have defined
in my skinning file. But what I would like to do additionally, is to
have a third background color based on some logic.
I have tried two versions so far, but the background color wasn't
changed red (In my case Bean.getStatusClass() returns the string
"redcolor", and in my .css it is defined like .redcolor
{background-color:##FF0000;}).
The two modifications:
1.
<tr:column styleClass="tblCenter w5 #{Bean.statusClass}">
<f:facet name="header">
<tr:outputText value="Status"/>
</f:facet>
<h:graphicImage value="#{Bean.statusImage}"
title="#{current.status}" />
</tr:column>
2.
<tr:column styleClass="tblCenter w5">
<f:facet name="header">
<tr:outputText value="Status"/>
</f:facet>
<h:panelGroup styleClass="#{Bean.statusClass}">
<h:graphicImage value="#{Bean.statusImage}"
title="#{current.status}" />
</h:panelGroup>
</tr:column>
Can anybody please help me about this?
I have another problem as well: I would like to add sorting possibility
to some of the columns, so I added sortable="true" and defined
sortProperty in my column element.
The problem is that the arrows can be found on a new line. I would like
to have it right next to my header text. Is it possible somehow?
Thank you for your help!
Tamas