Messagetoast and MessageBox Example

Messagetoast and MessageBox

View.xml :

        <Page title="Title">
<content>
<Table>
<headerToolbar>
<OverflowToolbar>

<Button type="Reject" text="Messagetoast" press="onToast" />
<Button type="Accept" text="Messagebox" press="onBbox" />


</OverflowToolbar>
</headerToolbar>

</Table>
</content>

</Page>

Controller.js :


jQuery.sap.require("sap.m.MessageBox");


onInit: function() {
},

onBbox: function() {
sap.m.MessageBox.show("pressed");
},

onToast: function()
{
sap.m.MessageToast.show("Pressed");
}




Post a Comment

Previous Post Next Post