Hi
I was just wondering how to get reference to a view element from another view. I have couple of views in the Ui5 project, and from one view - I need to update other view element
view 1 -
var oImage = new sap.ui.commons.Image("idImageYard",{
press:
function(oEvent){
if(!oOverlayContainer.isOpen()){
oOverlayContainer.open();
}
} });
oImage.setSrc("images/"+propA+".jpg");
view 2 -
var image = sap.ui.getCore().byId("idImageYard");
image.setSrc("images/"+yardNo+".jpg");
this returns image object is undefined.
How do I get access to the view 1 element from view 2?
Thank you
Aakash