Nah... have to take that back. This works better but only once: It works better like this: for (IBehavior behavior : modalWindow.getBehaviors()) { if (behavior instanceof AbstractDefaultAjaxBehavior) { ((AbstractDefaultAjaxBehavior) behavior).onRequest(); break; } }
It seems to somehow break the tester flow and the last rendered page is somehow not up-to-date. Help, pls :) ** Martin 2009/7/21 Martin Makundi <martin.maku...@koodaripalvelut.com>: > Here is one workaround I found, but of course a) it should be built-in > and b) automatic. > > public void executeModalWindoCloseCallback(ModalWindow modalWindow) { > for (IBehavior behavior : modalWindow.getBehaviors()) { > if (behavior instanceof AbstractDefaultAjaxBehavior) { > tester.executeBehavior((AbstractAjaxBehavior) behavior); > break; > } > } > } > > ** > Martin > > 2009/7/21 Martin Makundi <martin.maku...@koodaripalvelut.com>: >> Hi! >> >> I have the same problem as >> http://www.mail-archive.com/users@wicket.apache.org/msg05826.html >> >> Is it solved? >> >> I have a ModalWindow with a "close" button in it, the button's >> "onclick" calls modalWindow.close() via AJAX. >> >> My problem is that when I call the onclick via >> wicketTester.executeAjaxEvent(button, "onclick") the modalWindow's >> windowClosedCallback doesn't fire.. Am I missing something? Or am I >> supposed to call it from the testcase? >> >> Many thanks for your time! >> >> ** >> Martin >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org