- 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}"/>
Advertisements