use of org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup in project kie-wb-common by kiegroup.
the class JPADataObjectEditorViewImpl method showYesNoCancelPopup.
@Override
public void showYesNoCancelPopup(String title, String message, Command yesCommand, String yesButtonText, ButtonType yesButtonType, Command noCommand, String noButtonText, ButtonType noButtonType, Command cancelCommand, String cancelButtonText, ButtonType cancelButtonType) {
YesNoCancelPopup yesNoCancelPopup = YesNoCancelPopup.newYesNoCancelPopup(title, message, yesCommand, yesButtonText, yesButtonType, noCommand, noButtonText, noButtonType, cancelCommand, cancelButtonText, cancelButtonType);
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 ImportsWidgetViewImpl method setup.
private void setup() {
// Setup table
table.setStriped(true);
table.setCondensed(true);
table.setBordered(true);
table.setEmptyTableWidget(new Label(ImportConstants.INSTANCE.noImportsDefined()));
// Columns
final TextColumn<Import> importTypeColumn = new TextColumn<Import>() {
@Override
public String getValue(final Import importType) {
return importType.getType();
}
};
final ButtonCell deleteImportButton = new ButtonCell(IconType.TRASH, ButtonType.DANGER, ButtonSize.SMALL);
final Column<Import, String> deleteImportColumn = new Column<Import, String>(deleteImportButton) {
@Override
public String getValue(final Import importType) {
return ImportConstants.INSTANCE.remove();
}
};
deleteImportColumn.setFieldUpdater((index, importType, value) -> {
if (isReadOnly) {
return;
}
final YesNoCancelPopup confirm = YesNoCancelPopup.newYesNoCancelPopup(ImportConstants.INSTANCE.remove(), ImportConstants.INSTANCE.promptForRemovalOfImport0(importType.getType()), () -> getRemoveImportCommand().execute(importType), () -> {
/*Nothing*/
}, null);
confirm.show();
});
table.addColumn(importTypeColumn, new TextHeader(ImportConstants.INSTANCE.importType()));
table.addColumn(deleteImportColumn, ImportConstants.INSTANCE.remove());
// Link data
getDataProvider().addDataDisplay(table);
getDataProvider().setList(importTypes);
}
use of org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup in project kie-wb-common by kiegroup.
the class DefaultWorkbenchErrorCallback method error.
@Override
public boolean error(final Message message, final Throwable throwable) {
if (isInvalidBusContentException(throwable)) {
final YesNoCancelPopup result = YesNoCancelPopup.newYesNoCancelPopup(DefaultWorkbenchConstants.INSTANCE.SessionTimeout(), DefaultWorkbenchConstants.INSTANCE.InvalidBusResponseProbablySessionTimeout(), Window.Location::reload, null, () -> {
});
result.clearScrollHeight();
result.show();
return false;
} else if (isKieServerForbiddenException(throwable)) {
ErrorPopup.showMessage(DefaultWorkbenchConstants.INSTANCE.KieServerError403());
return false;
} else if (isKieServerUnauthorizedException(throwable)) {
ErrorPopup.showMessage(DefaultWorkbenchConstants.INSTANCE.KieServerError401());
return false;
} else if (throwable instanceof KieServicesHttpException) {
KieServicesHttpException ex = (KieServicesHttpException) throwable;
ErrorPopup.showMessage(CommonConstants.INSTANCE.ExceptionGeneric0(ex.getExceptionMessage()));
return false;
} else {
return super.error(message, throwable);
}
}
use of org.uberfire.ext.widgets.common.client.common.popups.YesNoCancelPopup in project kie-wb-common by kiegroup.
the class PopupsUtil method showOkButtonPopup.
private static void showOkButtonPopup(final String title, final String message) {
YesNoCancelPopup yesNoCancelPopup = YesNoCancelPopup.newYesNoCancelPopup(title, message, new Command() {
@Override
public void execute() {
}
}, CommonConstants.INSTANCE.OK(), null, null, null, 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 DataModelerScreenViewImpl method showYesNoCancelPopup.
@Override
public void showYesNoCancelPopup(String title, String message, Command yesCommand, String yesButtonText, ButtonType yesButtonType, Command noCommand, String noButtonText, ButtonType noButtonType) {
YesNoCancelPopup yesNoCancelPopup = YesNoCancelPopup.newYesNoCancelPopup(title, message, yesCommand, yesButtonText, yesButtonType, noCommand, noButtonText, noButtonType, new Command() {
@Override
public void execute() {
// do nothing, but let the cancel button be shown.
}
}, null, null);
yesNoCancelPopup.setClosable(false);
yesNoCancelPopup.show();
}
Aggregations