MessageBox
NEW SYNTAX +++ Creates modal message and confirm dialogs. It is easy to use and reach of features.
*** Please vote to honor my work.***
Version 4.x.x: Vaadin 8.0.5+
Version 3.x.x: Vaadin 7.2+ with method chaining syntax
Version 2.x.x: Vaadin 7+
Version 1.1.x: Vaadin 6.7+
The ONLINE DEMO is deactivated since 2018-05-04. Openshift continously disables my account. It annoys me and I am not longer interested in Openshift. If you know another free vm provider, please let me know. Thanks!
DESCRIPTION
You simply want to show a message dialog? Unfortunally, Vaadin does not offer such a dialog. This add-on closes this gap. Now, the button captions are translated to more than 40 languages!
USAGE
It's very simple, flexible and self-explaining code:
MessageBox
.createInfo()
.withCaption("Info")
.withMessage("Hello World!")
.withOkButton(() -> System.out.println("Ok pressed."))
.open();
You can add more buttons with button listeners. But you can do much more. Test the demo to find out all features!
THANK YOU
I thank all contributors for the i18n, bug reports and ideas. It helps me a lot to improve the quality of this addon. Also I am glad about so much feedback. That is the cause, why I write open source and I maintain this addon.
Sample code
MessageBox .createInfo() .withCaption("Example 1") .withMessage("Hello World!") .withOkButton() .open();
MessageBox .createQuestion() .withCaption("Example 6") .withMessage("Do you really want to continue?") .withYesButton(() -> { System.out.println("Yes button was pressed."); }) .withNoButton(() -> { System.out.println("No button was pressed."); }) .open();
MessageBox .create() .createCaption("Example 9") .createMessage("Long plain text has to be broken manually with an '\\n':\n1. line\n2. line\n3. line\n4. line\n5. line\n6. line") .open();
MessageBox .createInfo() .withCaption("Custom button captions") .withMessage("Button captions replaced!") .withYesButton(ButtonOption.caption("Yea")) .withNoButton(ButtonOption.caption("Nay")) .open()
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Improved exception handling for the EventListener. The exception inside the EventListener has not to be catched anymore. Now, the dialog closes always.
- Released
- 2012-06-18
- Maturity
- STABLE
- License
- Apache License 2.0
Compatibility
- Framework
- Vaadin 6.0+
- Vaadin 8.0+ in 4.0.21
- Vaadin 7.2+ in 3.0.19
- Vaadin 7.0+ in 3.0.4
- Vaadin 6.7+ in 1.1.3
- Browser
- Browser Independent
MessageBox - Vaadin Add-on Directory
NEW SYNTAX +++ Creates modal message and confirm dialogs. It is easy to use and reach of features.Version 3.x.x: Vaadin 7.2+ with method chaining syntax
Version 2.x.x: Vaadin 7+
Version 1.1.x: Vaadin 6.7+
The ONLINE DEMO is deactivated since 2018-05-04. Openshift continously disables my account. It annoys me and I am not longer interested in Openshift. If you know another free vm provider, please let me know. Thanks! DESCRIPTION ============ You simply want to show a message dialog? Unfortunally, Vaadin does not offer such a dialog. This add-on closes this gap. Now, the button captions are translated to more than 40 languages! USAGE ====== It's very simple, flexible and self-explaining code: MessageBox .createInfo() .withCaption("Info") .withMessage("Hello World!") .withOkButton(() -> System.out.println("Ok pressed.")) .open(); You can add more buttons with button listeners. But you can do much more. Test the demo to find out all features! THANK YOU ========== I thank all contributors for the i18n, bug reports and ideas. It helps me a lot to improve the quality of this addon. Also I am glad about so much feedback. That is the cause, why I write open source and I maintain this addon.