i am creating buttons inside the fuction in controller.......now i want to call a different function on pressing button....how it is possible.....
sap.ui.controller("assignment.main_page", {
form:function()
{
var extension2_button=new sap.ui.commons.Button("extension2_button",{ text:"Delete Row",width:"120px",press:function(){this.delete_row();}});
}
this syntex i am using