You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Stefan Lindner <li...@visionet.de> on 2009/08/13 20:14:12 UTC

1.4 ModalWindow closes on second submit attempt in FireFox

I have a ModelWindow with a Panel containing a Form as content. When I submit the Form with an AjaxButton the first time everything is OK. Now when I click the AjaxSubmit a second time, FireFox wants to close the ModalWindow "Reloading this page will cause the modal window to disappear."

I found some hits on "Reloading this page will cause the modal window to disappear" but none of thme adresses FireFox.

The URL after the ModelWindow was closed is http://localhost:8080/VisioDesk/?id1a_hf_0=&name=&geplanterZeitpunktWoche=&wochentag=&dauerInMinuten%3AinputField=0&dauerInMinuten%3AselectField=&anfangUhrzeit=&ressourcen%3Aselect1=&ressourcen%3Aselect2=&personal%3Aselect1=&personal%3Aselect2=&submitButton=speichern

Any idea?

RE: 1.4 ModalWindow closes on second submit attempt in FireFox

Posted by Stefan Lindner <li...@visionet.de>.
When I add each individual child oft he Form to the AjaxRequestTarget's Components by

	Iterator<? extends Component> it = form.iterator();
	while (it.hasNext())
		Component c = it.next();
		if (c.getOutputMarkupId() && c.isVisible())
			target.addComponent(c);

Everything works too. So this could be a workaround for me. But is this the inteded way?

-----Ursprüngliche Nachricht-----
Von: Stefan Lindner [mailto:lindner@visionet.de] 
Gesendet: Donnerstag, 13. August 2009 20:47
An: users@wicket.apache.org
Betreff: RE: 1.4 ModalWindow closes on second submit attempt in FireFox

After a little bit more investigation:
1. Now I use AjaxSubmitLink instead of AjaxButton.
   --> same problem
2. I noticed that I have
   	@Override
	protected void onError(final AjaxRequestTarget target, final Form<?> form) {
		form.visitFormComponents(myInputfieldMarkerForInvalidInput);
		target.addComponent(form);
	}
   --> If I don't call 'target.addComponent(form);' the problem disappears.

Is this a known problem? Is it forbidden to add a Form in a ModalWindow to an AjaxRequestTargets Components?

Stefan

-----Ursprüngliche Nachricht-----
Von: Stefan Lindner [mailto:lindner@visionet.de] 
Gesendet: Donnerstag, 13. August 2009 20:14
An: users@wicket.apache.org
Betreff: 1.4 ModalWindow closes on second submit attempt in FireFox

I have a ModelWindow with a Panel containing a Form as content. When I submit the Form with an AjaxButton the first time everything is OK. Now when I click the AjaxSubmit a second time, FireFox wants to close the ModalWindow "Reloading this page will cause the modal window to disappear."

I found some hits on "Reloading this page will cause the modal window to disappear" but none of thme adresses FireFox.

The URL after the ModelWindow was closed is http://localhost:8080/VisioDesk/?id1a_hf_0=&name=&geplanterZeitpunktWoche=&wochentag=&dauerInMinuten%3AinputField=0&dauerInMinuten%3AselectField=&anfangUhrzeit=&ressourcen%3Aselect1=&ressourcen%3Aselect2=&personal%3Aselect1=&personal%3Aselect2=&submitButton=speichern

Any idea?

RE: 1.4 ModalWindow closes on second submit attempt in FireFox

Posted by Stefan Lindner <li...@visionet.de>.
After a little bit more investigation:
1. Now I use AjaxSubmitLink instead of AjaxButton.
   --> same problem
2. I noticed that I have
   	@Override
	protected void onError(final AjaxRequestTarget target, final Form<?> form) {
		form.visitFormComponents(myInputfieldMarkerForInvalidInput);
		target.addComponent(form);
	}
   --> If I don't call 'target.addComponent(form);' the problem disappears.

Is this a known problem? Is it forbidden to add a Form in a ModalWindow to an AjaxRequestTargets Components?

Stefan

-----Ursprüngliche Nachricht-----
Von: Stefan Lindner [mailto:lindner@visionet.de] 
Gesendet: Donnerstag, 13. August 2009 20:14
An: users@wicket.apache.org
Betreff: 1.4 ModalWindow closes on second submit attempt in FireFox

I have a ModelWindow with a Panel containing a Form as content. When I submit the Form with an AjaxButton the first time everything is OK. Now when I click the AjaxSubmit a second time, FireFox wants to close the ModalWindow "Reloading this page will cause the modal window to disappear."

I found some hits on "Reloading this page will cause the modal window to disappear" but none of thme adresses FireFox.

The URL after the ModelWindow was closed is http://localhost:8080/VisioDesk/?id1a_hf_0=&name=&geplanterZeitpunktWoche=&wochentag=&dauerInMinuten%3AinputField=0&dauerInMinuten%3AselectField=&anfangUhrzeit=&ressourcen%3Aselect1=&ressourcen%3Aselect2=&personal%3Aselect1=&personal%3Aselect2=&submitButton=speichern

Any idea?