I want to change the color of the table cell, but I find it hard to transform the code to XMLView from JSView. Can you guys give me a hand ? What I've managed so far, is to add the text of the color, but what I want is to color the text itself (or the background)
Here is the code:
<ObjectIdentifier
title="{Invoices>BillValue}"
text = "{parts : [ 'Invoices>InvoiceRest' ],
formatter: 'Invoices.Formatter.BillColor'
}"/>
And in the "formatter" (I don't know why it doesn't want to format the text bellow :( ):
jQuery.sap.declare("Invoices.Formatter");
Invoices.Formatter = {
BillColor : function (fValue1) {
try {
if (Number(fValue1) > 0) {
return "red";
} else {
return "green";
}
} catch (err) {
return "None";
} } };
Thanks