RE: ConfirmDialog error

Hi! Sounds like you rea using wrong version of the ConfirmDialog add-on. There are two versions of this add-on specific to Vaadin different versions: ConfirmDialog 1.1.x supports Vaadin 6.5, and ConfirmDialog 1.0.x supports Vaadin 6.3 and 6.4. You can change the downloaded version on the top header.
http://vaadin.com/addon/confirmdialog

The original question seems to have disappeared from this thread, but if you experience any runtime class incompatibility issues with the ConfirmDialog. the reason is that you got the wrong version of the add-on for you Vaadin version. More info at
vaadin.com/addon/confirmdialog

Error is typically about the missing method in Window class:

Caused by: java.lang.NoSuchMethodError: com.vaadin.ui.Window.removeWindow(Lcom/vaadin/ui/Window;)V
at org.vaadin.dialogs.DefaultConfirmDialogFactory$2.buttonClick(DefaultConfirmDialogFactory.java:133)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)

I just tried ConfirmDialog 1.2.0 on Vaadin 6.7.8 and am getting that very exception:

Caused by: java.lang.RuntimeException: Failed to remove confirmation dialof from the parent window.
        at org.vaadin.dialogs.DefaultConfirmDialogFactory$2.buttonClick(DefaultConfirmDialogFactory.java:145)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:512)
        ... 28 more
Caused by: java.lang.NoSuchMethodException: com.esignforms.open.vaadin.main.MainWindow.removeWindow(com.vaadin.ui.Window)
        at com.zeroturnaround.javarebel.zj.getDeclaredMethod(JRebel:718)
        at java.lang.Class.getDeclaredMethod(Unknown Source)
        at org.vaadin.dialogs.DefaultConfirmDialogFactory$2.buttonClick(DefaultConfirmDialogFactory.java:141)

But it seems like that ConfirmDialog 2.0 is for Vaadin 7, which I’m not yet on, so isn’t this 1.2.0 the right version for Vaadin 6.7.8?

EDIT: P.S. If you include the source code in the JAR, it makes debugging easier.

Per the
GitHub bug report
, this work-around fixed my problem for now, by adding this to my MainWindow class:


	//TODO: Just here for ConfirmDialog 1.2.0 which has a known problem.
	@Override
	public boolean removeWindow(Window w)
	{
		return super.removeWindow(w);
	}