I have a script creating buttons in a table.
Each button is assigned to the same callback server function.
My question is how do I know which of these buttons triggered the server call?
Also is there a way of outputting a msgbox from the server script? When I try browser.msgBox, it gives an error saying that msgbox can’t be used in this context.
var clientDel = app.createServerHandler("delStudent").addCallbackElement(grid);
table.setWidget(t, 4, app.createButton("Delete", clientDel).setId("del1"));
function delStudent(e){
var app = UiApp.getActiveApplication();
e.
return app;
}
Thanks,
C Singh.
e.parameter.sourcewill return the ID of the widget that originates the handler functiongetElementById(label_ID').setVisible(true)and put any text in it.If you want it to appear at a specific position above all other widgets you can do that quite simply using
setStyleAttributes, see this other post(server version) for further info and practical example