Directory

← Back

MessageBox

NEW SYNTAX +++ Creates modal message and confirm dialogs. It is easy to use and reach of features.

Author

Rating

Popularity

100+

*** 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()

Compatibility

(Loading compatibility data...)

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

Migration to Vaadin 8. Support for VaadinIcons added and FontAwesome factories set to deprecated.

Released
2017-04-23
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 8.0+
Vaadin 6.0+ in 1.0.0
Vaadin 6.7+ in 1.1.3
Vaadin 7.0+ in 2.0.1
Vaadin 7.2+ in 3.0.5
Browser
N/A

MessageBox - Vaadin Add-on Directory

NEW SYNTAX +++ Creates modal message and confirm dialogs. It is easy to use and reach of features. MessageBox - Vaadin Add-on Directory
*** 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.
Online