Why is the SC.ask window ignoring the given button titles? In an old version of smartgwt this code was working, and now not.
The button titles should be "yes" and "no". But I always see "OK", and "Cancel".
Using smartgwt 4.0 power 2013-11-27.
The button titles should be "yes" and "no". But I always see "OK", and "Cancel".
Code:
public class TestingModule implements EntryPoint {
public void onModuleLoad() {
IButton clickMe = new IButton("Click me");
clickMe.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
SC.ask("title", "really?", null, getConfirmDialogProperties());
}
});
clickMe.draw();
}
private static Dialog getConfirmDialogProperties()
{
Dialog dialog = new Dialog();
Button okButton = Dialog.OK;
okButton.setTitle( "yes" );
Button cancelButton = Dialog.CANCEL;
cancelButton.setTitle( "no" );
dialog.setButtons( okButton, cancelButton );
return dialog;
}
}