on 02-01-2016 6:12 AM
Need to apply image based on the condition. Can you please help me how to apply image conditionally.
new sap.ui.commons.Image({
src : ("{Products>Imagedata}" == "test") ? "./Images/test.png" : "./Images/NoTest.png",
height : "30px"
});
Hi Santosh,
Use formatter. Will this sample help? Plunker
Image finds the src based on the country value.
Regards,
Sai Vellanki.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Santhosh,
Use formatter,based on binded value you can return required output,sample for the same below:
new sap.ui.commons.Image(
{
visible: {
parts : ['src'],
formatter : function(src) {
return (src== "test") ? "./Images/test.png" : "./Images/NoTest.png";
}
}
}
).bindProperty("src", "src")
Regards
Naveen S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.