on 01-29-2015 3:05 AM
Hi,
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;
sap.ui.getCore().byId("signature1").setContent(document.getElementById("saveSignature"));
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.
regards
Nagarjun
Hi Maksim,
Yes i have couple of views and controllers in my Project, I have strucked up with this. If you can just give me the necessary syntax for setting the image from one controller to another view it would be helpful. and oblige.
regards,
Nagarjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maksim,
actually the business logic is in seperate controller(EAM_order_console.controller.js), and the view is in another seperate view that is (EAM_order_view.view.js). the above said way is only valid for the same view and controller. Is there any method to call from another controller to another view, please advice.
regards,
Nagarjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maksim,
Thanks for your reply, well i am using html5 canvas elements,
inside view.............
var htmlOutput1 = ' <img id="saveSignature" style="background-color:white; width:100px;/>';
var signature1 = new sap.ui.core.HTML("signature1",{
content : htmlOutput1,
preferDOM : false}
});
how to set the image in the controller, so that ill be in a position to get the image in this view. please adivce.
regards,
Nagarjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can reference a view from controller by calling getView
https://sapui5.netweaver.ondemand.com/sdk/#docs/api/symbols/sap.ui.core.mvc.Controller.html#getView
//assume saveSignature is id of sap.ui.commons.Image or sap.m.Image
var string=sessionStorage.getItem("GloblalOfflineSign");
this.getView().byId("saveSignature").setSrc(string);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.