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:
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