Tuesday, 25 December 2018

overlaycontainer

overlaycontainer.view.js:
sap.ui.jsview("overlaycontainer.overlaycontainer", {


getControllerName : function() {
return "overlaycontainer.overlaycontainer";
},


createContent : function(oController) {
function handler(oEvent) {
alert("Event '"+oEvent.getId()+"' triggered");
}

var oOverlayContainer = new sap.ui.ux3.OverlayContainer();
oOverlayContainer.addContent(new sap.ui.commons.TextView({text: "Some Content ..."}));
oOverlayContainer.addContent(new sap.m.Button({text:"button"}));
       
oOverlayContainer.attachClose(handler);
oOverlayContainer.attachOpen(handler);
oOverlayContainer.attachOpenNew(handler);

var oButton = new sap.ui.commons.Button({
text: "Open Overlay Container",
press: function(oEvent){
if(!oOverlayContainer.isOpen()){
oOverlayContainer.open();
}
}
}).addStyleClass("red");
  return new sap.m.Page({
title: "Title",
content: [
oButton
]
});
}

});
output:

No comments:

Post a Comment

test ganaral binding(testing )

  /home/user/projects/project1/webapp/model/record.json: {     "text" : "outer text" ,     "myrecorsd" : [    ...