Skip to Content
0
May 05, 2016 at 06:10 AM

back ground color for ui5 control based on attribute value

375 Views

Hi all,

I have a object header sap.m.object header , how can i add a css class to this control based on the value of a attribute or number field

for example

var ticket_details = new sap.m.ObjectHeader('ticket_details', {

title:"{Ticket}",

intro:"{Type}",

attributes : [

new sap.m.ObjectAttribute({

title:"",

text : "{value}",

})

],

});

how can i change the background color or any css property to object header based on the attribute text value . so if the value is greater than 90 the object header background should changed to red like wise..

Thanks

Prasad