I just wanted to confirm that add(Component...) in AjaxRequestHandler
will only work with (i.e., refresh) components that are on the same
page as the page associated with the AjaxRequestHandler.

I had a case where the content of a ModalWindow was a WebPage.  In the
modal window, there was an AjaxLink where I was trying to update a
component on the underlying page in the onSubmit method using the
AjaxRequestHandler object (not directly, in an event handler on the
underlying page).  However, this didn't work and I noticed that the
AjaxRequestHandler object referred to the WebPage in the modal window,
not the page from which the modal was launched.  If I change from
using a page in the modal to using a panel (and thus the
AjaxRequestHandler.page refers to the underlying page), the underlying
page gets properly updated.

If it is true that an AjaxRequestHandler can only be used to update
components on the page it is associated with, would it make sense to
add a warning to either AjaxjRequestHandler or AbstractAjaxResponse if
a component is added which is not on the page associated with the
AjaxRequestHander or AbstractAjaxResponse?


To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to