Hi, On Thu, Mar 28, 2013 at 3:54 AM, Andrew Geery <andrew.ge...@gmail.com>wrote:
> 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? > Yes, this is true. This is not so common issue but yes, we can log a warning if a component for re-render is not in the current page. Please file a ticket. > > Thanks > Andrew > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com <http://jweekend.com/>