Hello,
I am working on a SAPUI5 Mobile Application prototype, and wish to have a conditional icon in the list.I am working with ODataModel to get the data form the server.
list.bindAggregation("items", {
path:"/CollectionName",
template: new sap.m.StandardListItem({
icon: sap.ui.core.IconPool.getIconURI('accept'),
type : sap.m.ListType.Navigation,
title: '{Parameter1}',
description: '{Parameter2}',
info: '{CurrentParameter3}',
tap: function(evt){}
})
});
Based on the value of a Parameter4 i wish to dynamically pass the icons in the list, so effectively it will be
if (Parameter4 = "Somthing") {
icon : sap.ui.core.IconPool.getIconURI('accept')
} else {
icon : sap.ui.core.IconPool.getIconURI('alert)
}
Many Thanks in advance
Nikhil