use of org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup in project kie-wb-common by kiegroup.
the class MetadataWidget method onForceUnlock.
@UiHandler("unlock")
public void onForceUnlock(ClickEvent e) {
final YesNoCancelPopup yesNoCancelPopup = YesNoCancelPopup.newYesNoCancelPopup(MetadataConstants.INSTANCE.ForceUnlockConfirmationTitle(), MetadataConstants.INSTANCE.ForceUnlockConfirmationText(metadata.getLockInfo().lockedBy()), new Command() {
@Override
public void execute() {
forceUnlockHandler.run();
unlock.setEnabled(false);
}
}, new Command() {
@Override
public void execute() {
}
}, null);
yesNoCancelPopup.setClosable(false);
yesNoCancelPopup.show();
}
use of org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup in project kie-wb-common by kiegroup.
the class AbstractToolbarCommand method executeWithConfirm.
protected void executeWithConfirm(final Command command) {
final Command yesCommand = () -> {
command.execute();
};
final Command noCommand = () -> {
};
// TODO: I18n.
final YesNoCancelPopup popup = YesNoCancelPopup.newYesNoCancelPopup("Are you sure?", null, yesCommand, noCommand, noCommand);
popup.show();
}
use of org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup in project kie-wb-common by kiegroup.
the class AbstractToolbarCommand method executeWithConfirm.
private <V> void executeWithConfirm(final ClientSessionCommand.Callback<V> callback) {
final Command yesCommand = () -> {
this.executeWithNoConfirm(callback);
};
final Command noCommand = () -> {
};
final YesNoCancelPopup popup = YesNoCancelPopup.newYesNoCancelPopup(getConfirmMessage(), null, yesCommand, noCommand, noCommand);
popup.show();
}
use of org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup in project kie-wb-common by kiegroup.
the class FormEditorViewImpl method showSavePopup.
@Override
public void showSavePopup(Path path, Command saveCommand, Command cancelCommand) {
YesNoCancelPopup popup = YesNoCancelPopup.newYesNoCancelPopup(org.uberfire.ext.widgets.common.client.resources.i18n.CommonConstants.INSTANCE.Information(), translationService.getTranslation(FormEditorConstants.FormEditorViewImplSaveBeforeRename), saveCommand, CommonConstants.INSTANCE.Save(), null, null, cancelCommand, translationService.getTranslation(FormEditorConstants.FormEditorViewImplDontSave));
popup.show();
}
use of org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup in project kie-wb-common by kiegroup.
the class DefaultSocialLinkCommandGenerator method generateNoRightsPopup.
void generateNoRightsPopup() {
YesNoCancelPopup popup = YesNoCancelPopup.newYesNoCancelPopup(CommonConstants.INSTANCE.Information(), Constants.INSTANCE.Error_NoAccessRights(), null, null, () -> {
/* do nothing, just to show the cancel button*/
});
popup.setClosable(false);
popup.show();
}
Aggregations