use of org.jboss.errai.ui.shared.api.annotations.EventHandler in project kie-wb-common by kiegroup.
the class NameAndUrlPopoverViewImpl method onClickOkButton.
@EventHandler("okButton")
@SuppressWarnings("unused")
public void onClickOkButton(final ClickEvent clickEvent) {
final Consumer<DMNExternalLink> consumer = getOnExternalLinkCreated();
if (!Objects.isNull(consumer)) {
final String description = attachmentNameInput.value;
final String url = urlInput.value;
final DMNExternalLink externalLink = new DMNExternalLink(url, description);
consumer.accept(externalLink);
}
hide();
}
use of org.jboss.errai.ui.shared.api.annotations.EventHandler in project kie-wb-common by kiegroup.
the class GenericErrorPopup method onCopyDetailsClicked.
@EventHandler("copy-details")
public void onCopyDetailsClicked(final ClickEvent event) {
showErrorDetails(true);
final boolean copySucceeded = clipboard.copy(errorDetails);
if (copySucceeded) {
notificationEvent.fire(new NotificationEvent(DefaultWorkbenchConstants.INSTANCE.ErrorDetailsSuccessfullyCopiedToClipboard(), SUCCESS));
} else {
notificationEvent.fire(new NotificationEvent(DefaultWorkbenchConstants.INSTANCE.ErrorDetailsFailedToBeCopiedToClipboard(), WARNING));
}
console.error(errorDetails.textContent);
}
use of org.jboss.errai.ui.shared.api.annotations.EventHandler in project kie-wb-common by kiegroup.
the class GenericErrorPopup method onContinueButtonClicked.
@EventHandler("continue-button")
public void onContinueButtonClicked(final ClickEvent event) {
console.error(errorDetails.textContent);
if (doNotShowAgainCheckbox.checked) {
final TimeAmount duration = TimeAmount.valueOf(timeSelect.value);
genericErrorTimeController.setTimeout(duration);
}
close();
}
use of org.jboss.errai.ui.shared.api.annotations.EventHandler in project kie-wb-common by kiegroup.
the class VariableListItemWidgetViewImpl method handleAcceptButton.
@EventHandler("acceptButton")
public void handleAcceptButton(final ClickEvent e) {
final String tagAdded = tagNamesComboBox.getValue();
if (!Strings.isNullOrEmpty(tagAdded) && !tagSet.contains(tagAdded)) {
for (final HTMLAnchorElement closeAnchor : removeButtons.values()) {
closeAnchor.onclick.onInvoke(new elemental2.dom.Event("DoNotUpdateModel"));
}
removeButtons.clear();
tagSet.add(tagAdded);
setCustomTags(setToList(tagSet));
notifyModelChanged();
if (!VariablesEditorFieldRenderer.getDefaultTagsSet().contains(tagAdded) && getPreviousCustomValue() != null && !tagAdded.equals(getPreviousCustomValue())) {
// Is custom
tagSet.remove(getPreviousCustomValue());
}
renderTagElementsBadges();
}
}
use of org.jboss.errai.ui.shared.api.annotations.EventHandler in project drools-wb by kiegroup.
the class FileUploadPopupView method onFileChangeEvent.
@EventHandler("file")
public void onFileChangeEvent(ChangeEvent event) {
fileName = file.getValue();
if (fileName.toLowerCase().startsWith(FAKEPATH)) {
fileName = fileName.substring(FAKEPATH.length());
}
fileText.setValue(fileName);
JavaScriptObject files = file.getPropertyJSO("files");
readTextFile(files);
if (!"".equals(fileText.getValue())) {
okButton.setEnabled(true);
}
}
Aggregations