Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to set the Image from one controller into a view


         I am currently working on the proof of concept, I have used the concept of the navContainer, ie, (sap.ui.commons.Panel) like removing the content and adding the new content to the container. i am currently facing some issues while setting the image into the view through the controller.

inside controller...........

var string=sessionStorage.getItem("GloblalOfflineSign");

      document.getElementById("saveSignature").src = string;


inside view......

var htmlOutput1 = ' <img id="saveSignature"   style="background-color:white; width:100px; height:50px; border: 1px solid #c4caac;"/>';

  var signature1 = new sap.ui.core.HTML("signature1",{

             content : htmlOutput1,


Is there any other method to set the data from controller to the view...? similar to ".setText" or ".setValue". please advice.



Not what you were looking for? View more on this topic or Ask a question