Add-on: ConfirmDialog

Small announcement: Recently extracted another piece of useful code from the


This should me most useful building up quickly small apps, but it should be generic enough to fit into any Vaadin application. The component is server-side-only so you can avoid the widgetset compilation.


I am a french user and I get an exception while trying to use this addon :

Caused by: java.lang.IllegalArgumentException: Invalid size argument: "2,5em" (should match ^(-?\d+(\.\d+)?)(%|px|em|ex|in|cm|mm|pt|pc)?$)
	at com.vaadin.ui.AbstractComponent.parseStringSize(

In France we use the coma “,” as the separator for decimals.

     * Format a double single fraction digit.
     * @param n
     * @return
    private String format(double n) {
        NumberFormat nf = NumberFormat.getNumberInstance();
        return nf.format(n);

Should this method be calling NumberFormat.getNumberInstance(usLocale) instead of NumberFormat.getNumberInstance(), or as another user suggested, use buttons.setHeight(Double.toString(BUTTON_HEIGHT) + “em”) instead of buttons.setHeight(format(BUTTON_HEIGHT) + “em”);

Anyway the source link is broken so I cannot even modifiy the source to use this add-on :frowning:

EDIT => source is present in package, my mistake :slight_smile:

I get an error while using shortcut keys on confirm dialog :

	at java.util.HashMap$HashIterator.nextEntry(
	at java.util.HashMap$
	at com.vaadin.event.ActionManager.handleAction(
	at com.vaadin.event.ActionManager.handleActions(
	at com.vaadin.ui.Panel.changeVariables(
	at com.vaadin.ui.Window.changeVariables(
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVaria...

This seems to be an old message, I had missed. Anyway, I haven’t encountered the same at least with the latest versions. There also is a keyboard support in the ConfirmDialog itself currently.

The demo doesn’t seem to be working.

Also if someone could help me figure out how to set the content mode for the message to raw? ConfirmDialog#setContentMode() isn’t visible for me. Thanks!

Hi, how I can simply change Button for NativeButton and keep the same function?