Skip to Content
0
Former Member
Apr 24, 2014 at 02:03 PM

UI5 table Images

360 Views

Hi Experts,

I m working on UI5 table.I developed following page.

Now m facing issue with column sub test status.I m loading images in this column based on some condition as follows:

var oControl = new sap.ui.commons.TextView().bindProperty("text", "SubTeststatus",function(cellValue){
cellId = this.getId();
$("#"+cellId).parent().parent().removeClass("redmark");
$("#"+cellId).parent().parent().removeClass("greenmark");
switch(cellValue){
case 'R':
backgroundColor = 'redmark';
break;
case 'G':
backgroundColor = 'greenmark';
break;
default:
backgroundColor = 'white';
}

$("#"+cellId).parent().parent().addClass(backgroundColor);
});

My cell value is G or R.

Now problem is if i resize any column in table then sub test status is becoming blank i.e no images.

I prevented column resize but still same issue.

I think in bindProperty ,m not returning anything so causing issue.

But as my cell value is R and G ,based on this i need to load images.

Is any other approch is there to load images on page load based on condition?

How i can resolve this issue?

Regards,

Neha

Attachments

Grid.png (20.9 kB)