Link to home
Start Free TrialLog in
Avatar of IzabellaK
IzabellaK

asked on

Wicket 1.5 : inter-component event with ModalWindow

I recently migrate the Wicket 1.4 application to 1.5
In 1.5 I was using inter-component event to pass value from the ModalWindow's page to the calling page (in 1.4 ModalWindow.WindowClosedCallback was used for this purpose).
The problem : in onEvent I can't update the container from the calling page's panel because AjaxRequestTarget provided with event belongs to ModalWindow, not to the calling page.
I tried to update the calling page with setResponsePage(getPage()) in onEvent, but it reloads the right data in ModalWindow first (I issued close for it before), and then after clicking on close button in ModalWindow, the target container would be refreshed (in the calling page)
Avatar of leakim971
leakim971
Flag of Guadeloupe image

you may use postMessage to communicate between Modal and caling page :
https://developer.mozilla.org/fr/docs/Web/API/Window/postMessage
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.