This example shows how to get all the
columns to have the same background color. The background color
is based on the value of one of the attributes.
The following extract in XML shows the
business class definition.
<class>
<name>Alarm</name>
<attribute>
<name>identifier</name>
<javaClass>java.lang.String</javaClass>
</attribute>
<attribute>
<name>perceivedSeverity</name>
<javaClass>java.lang.Integer</javaClass>
</attribute>
<attribute>
<name>acknowledged</name>
<javaClass>java.lang.Boolean</javaClass>
</attribute>
<attribute>
<name>creationTime</name>
<javaClass>java.util.Date</javaClass>
</attribute>
</class>
The following configuration shows that the background color is
changed depending on the value of the attribute
perceivedSeverity
. In the following style sheet extract, the background color is
reset when the object is selected in the table. Selected objects
are displayed with the default table selected color.
The
pseudoclass
selected
is used to configure the representation of the selected objects.
In this example, the pseudoclass is repeated to increase the
specificity
of the
rule that handles the way a selected object
is rendered, thus forcing this rule to have priority over the
other rules. See
The CSS specification for more information.
object."Alarm/perceivedSeverity":selected:selected
{
labelBackground: '';
}