Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samie/vaadin-confirmdialog
ConfirmDialog Add-on for the Vaadin 6, 7, 8, and 14
https://github.com/samie/vaadin-confirmdialog
apache-license-2 java vaadin
Last synced: 21 days ago
JSON representation
ConfirmDialog Add-on for the Vaadin 6, 7, 8, and 14
- Host: GitHub
- URL: https://github.com/samie/vaadin-confirmdialog
- Owner: samie
- Created: 2012-02-04T05:47:27.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2024-02-16T13:18:46.000Z (9 months ago)
- Last Synced: 2024-02-16T14:34:11.152Z (9 months ago)
- Topics: apache-license-2, java, vaadin
- Language: Java
- Homepage: http://vaadin.com/addon/confirmdialog
- Size: 5.16 MB
- Stars: 17
- Watchers: 5
- Forks: 27
- Open Issues: 10
-
Metadata Files:
- Readme: README.creole
Awesome Lists containing this project
README
= ConfirmationDialog =
Ever needed a present a confirmation dialog in a Vaadin application?
Here is a way to do it nicely. The ConfirmDialog add-on provides you with a configurable way of requesting user confirmation for a button click or some other some operation.
Defaults like size calculation, keyboard bindings and styling are all there, but of course you can provide your own. Take a look at the demo application for sample code and use cases.
Currently only two-way (yes,no) confirmation is supported. Vote for three-way (yes,no,cancel) if you need it. And for "monolog box" use the Vaadin's own showNotification method.
This is a server-side-only component, so no need to recompile the widgetset.
== Usage of the add-on ==
{{{
Button button = new Button("Unsafe action", e -> {// The quickest way to confirm
ConfirmDialog.show(UI.getCurrent(), "Are you sure?",
(ConfirmDialog.Listener) dialog -> {
if (dialog.isConfirmed()) {
// Confirmed to continue
// DO STUFF
} else {
// User did not confirm
// CANCEL STUFF
}
});
});
add(button);
}}}== Developing and building ==
Project sources are hosted in github.com.
Project is built with maven. Sources are directly in src directory, tests in test directory.
ConfirmTestApplication has main method that launches itself into an embedded jetty. Selenium2 tests are run against it.