Re: question about page variable in AjaxRequestHandler

2013-03-28 Thread Andrew Geery
Done: https://issues.apache.org/jira/browse/WICKET-5121

Thanks
Andrew

On Thu, Mar 28, 2013 at 4:09 AM, Martin Grigorov  wrote:
> Hi,
>
> On Thu, Mar 28, 2013 at 3:54 AM, Andrew Geery 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 

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



Re: question about page variable in AjaxRequestHandler

2013-03-28 Thread Martin Grigorov
Hi,

On Thu, Mar 28, 2013 at 3:54 AM, Andrew Geery 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 


question about page variable in AjaxRequestHandler

2013-03-27 Thread Andrew Geery
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?

Thanks
Andrew

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