When a Page is used the modalWindow is loaded in an iframe, that's why it cannot find the elements in the "parent" page with the current implementation of wicket-ajax.js.
What's the problem to load several panel based modalwindows ? On Wed, Aug 24, 2011 at 4:21 PM, lunchbox <[email protected]> wrote: > Hi all, > > This question has been asked here several times before but there is really > no satisfactory answer. > > I have a modal window using PageCreator, and I need to ajax-refresh some > components on the parent page from where the modal window is opened, when it > is closed. I'm have a markup container on the parent page which I add to the > AjaxRequestTarget when closing the modal window from an ajax link. > > However, when the modal window uses a PageCreator, I see from the Javascript > console it will not find the container, probably because the container lives > in a separate Document. When the modal window uses a Panel instead of Page, > it works correctly. > > Here is the error you get when using a Page: > ERROR: Component with id [[container4]] a was not found while trying to > perform markup update. Make sure you called > component.setOutputMarkupId(true) on the component whose markup you are > trying to update. > > I need a Page since the modal window will contain other modal windows. > > Usually the proposed solution is to add container.setOutputMarkupId(true); > this is indeed a requirement but it will simply not help when using a Page > (instead of Panel) for the modal window. > > *Please, how can I get the parent page's container ajax-refreshed when > closing the modal window (which contains a Page)?* > > Thank you, > Lunchbox > > Please see: > http://apache-wicket.1842946.n4.nabble.com/modal-window-with-iframe-ajax-refresh-on-parent-page-td1878881.html > http://apache-wicket.1842946.n4.nabble.com/Updating-Main-Page-From-Modal-Using-AJAX-td1874542.html > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Ajax-refreshing-parent-page-from-modal-window-with-Page-content-tp3765286p3765286.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
