- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Assign image source dynamically in XML View in Fiori app in SAP UI5
Yes, it can be done but you need to compute the dynamic field.
Firstly, you need to mention that the binding is complex so change the flag −
“data-sap-ui-bindingSyntax="complex" ”.
Then have a helper function which can be used for formatting.
fnImageFmtr: function(value) { var imgSrc = "Image" + value; return imgSrc; }
And lastly, use the function in the image tag in the XML view.
<Image src="{path:'<Model Property>',formatter:'. fnImageFmtr}"/>
- Related Articles
- Using an Angular app as SAP Fiori application
- Change leaves duration from hours to days in SAP Fiori app
- In my SAP Fiori custom app, Back button is not working in Launchpad
- Packaging a mobile app in built-in SAP UI5 for Android using Cordova
- Reading an image using SAP OData v2 in UI5 application
- How to show only one view at a time in Wizard in SAP UI5?
- I have SAP UI5 application that I am not able to start after adding to SAP Fiori Launchpad.
- Image format supported in SAP HANA Modeling view export
- Loading External Libraries in SAP UI5
- Sorting List in SAP UI5 project
- Managing user sessions in SAP UI5 application
- Declare dynamically in SAP ABAP
- Binding model to sap.ui.core in SAP UI5 application
- In SAP UI5 render calling two times in custom control
- How to Dynamically Add Views into View in Android?

Advertisements