wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Grigorov <mgrigo...@apache.org>
Subject Re: Problem with TabbedPanel / setResponePage refreshing
Date Tue, 13 Feb 2018 10:07:12 GMT
Hi,

Component#onDetach() is called at the end of the request cycle.
MarkupContainer#removeAll() is not called usually during the request cycle.
#remove() merhods are like #add() - usually used by the application /
libraries, not by the framework.

Martin Grigorov
Wicket Training and Consulting
Looking for a remote position with Wicket ? Contact me!
https://twitter.com/mtgrigorov


On Mon, Feb 12, 2018 at 2:17 PM, Jarosław Ciarkowski <jarro06@gmail.com>
wrote:

> Hello,
> I guess my last mail was to complex so I'll try to simplify it:
>
> Why children's "onRemove" method is not called when "setResponsePage" is
> called?
> As I've written previously - manually invoking "page.removeAll()" works
> but shouldn't it be called automatically?
>
> Jarek
>
>
>
> On 09.02.2018 11:49, Jarosław Ciarkowski wrote:
>
>> Hello,
>>
>> I have one question regarding refreshing page with TabbedPanel and
>> refreshing page with setResponsePage method.
>>
>> In my application I had AjaxTabbedPanels. I needed to show confirmation
>> window on tab change though.
>> I've already had it on "window.onbeforeunload", so I changed
>> AjaxTabbedPanels to TabbedPanels - which refreshes page on tab change.
>>
>> The next thing was to do the same thing on button click. It works fine
>> with setResponsePage but...
>>
>> I have 2 actions which need to be called - one on page's child removal
>> and the second one on page refresh.
>>
>> Right now I call them on child's "onRemove" method and page's
>> "onInitialize" method.
>>
>> The problem is - when I change tab in TabbedPanel "onRemove" is called
>> but "onInitialize" isn't.
>> When I call setResponsePage (to the same page) it's the other way around
>> - "onInitialaze" is called but not "onRemove".
>>
>> I've got over it with manual call "page.removeAll()" right before
>> setResponsePage, but it solves only half of the problem and for me it looks
>> like a wrong solution.
>>
>> Is there any way to "catch" in the page class that it was refreshed by
>> the TabbedPanel? Is there better way to call "onRemove" with
>> setResponsePage than "page.removeAll()"? Or maybe there is a better way to
>> refresh a page than setResponsePage?
>>
>> I would be glad to receive some help.
>>
>> Thanks,
>> Jarek
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message