Hi. I want to change the background color of a table cell (td tag) under a
particular condition. This is on top of the regular odd/even css styles
that are applied on the row. I'm using DisplayTag 1.1 and tried to extend
the TableDecorator. I overrode the addRowClass method, but it is applying
for the entire row and not just for that one cell I am interested in. How
do I do this?
Here is my pseudo JSP code if I was not using Display Tag:
<c:choose>
<c:when test="${keyring.scheduleView>
<td style="background-color:pink">
</c:when>
<c:otherwise>
<td>
</c:otherwise>
</c:choose>
Here is my TableDecorator code but this only works for the entire row.
public class MercyTableDecorator extends TableDecorator
{
public String addRowClass()
{
return "yellow";
}
}
Please help me understand what I should do to change the CSS styles for a
PARTICULAR cell in a table (based on some condition). Thanks very much for
your help.
--
View this message in context:
http://www.nabble.com/HELP---I-want-to-format-the--background-of-a-Table-Cell-t1788863.html#a4873648
Sent from the DisplayTag - General forum at Nabble.com.
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user