use of com.extjs.gxt.ui.client.widget.MessageBox in project activityinfo by bedatadriven.
the class SiteDialogLauncher method promptUseNewEntry.
private static void promptUseNewEntry(final ActivityDTO dto) {
MessageBox box = new MessageBox();
box.setTitle(dto.getName());
box.setMessage(SafeHtmlUtils.fromString(I18N.CONSTANTS.pleaseUseNewDataEntry()));
box.setButtons(MessageBox.OKCANCEL);
box.addCallback(messageBoxEvent -> {
if (messageBoxEvent.getButtonClicked().getItemId().equals(MessageBox.OK)) {
App3.openNewTable(dto.getFormId());
}
});
box.show();
}
use of com.extjs.gxt.ui.client.widget.MessageBox in project activityinfo by bedatadriven.
the class ElementWidget method editTitle.
private void editTitle() {
final MessageBox box = new MessageBox();
box.setTitle(I18N.CONSTANTS.changeTitleDialogTitle());
box.setType(MessageBoxType.PROMPT);
box.setButtons(Dialog.OKCANCEL);
box.show();
box.getTextBox().setValue(model.getTitle());
box.addCallback(new Listener<MessageBoxEvent>() {
@Override
public void handleEvent(MessageBoxEvent be) {
if (be.getButtonClicked().getItemId().equals(Dialog.OK)) {
model.setTitle(box.getTextBox().getValue());
titleElement.setInnerText(ElementTitles.format(model));
}
}
});
}
Aggregations