sap.ui.commons.Dialog.extend("test.dialog", {
metadata : {},
init: function() {
if (sap.ui.commons.Dialog.prototype.init) {
sap.ui.commons.Dialog.prototype.init.apply(this, arguments);
}
var oLabel = new sap.ui.commons.Label({
text : "Testing Text in Dialog box"
});
this.addContent(oLabel);
},
renderer: function(oRm, oControl) {
sap.ui.commons.DialogRenderer.render(oRm, oControl);
}
});
Creating custom controller which extends Dialog
Pergunta
I am creating custom controller which extends Dialog. I want default function of Dialog thats why I write
renderer: function(oRm, oControl) {
sap.ui.commons.DialogRenderer.render(oRm, oControl);
oRm.write("Testing Text in Dialog box");
},
also I want to add some text and some controls in that dialog box but whenever I create object of my custom controller that time I get dialog box including the next text"Testing text in dialog box". I was unable to find out how to write the code. Above code is not working properly.
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow