-0

I also don't like having so much "onFinish" methods (currently there
are onEndRequest() and onDetach()).
I also suggested to Emond in IRC to extend RequestCycle class (option
b) below) but now I think he will need to tweak BaseWicketTester
because it has its own RequestCycle and this may be tricky.
But even with this reason I still don't like to have three step on-finish.


On Mon, Jun 13, 2011 at 10:04 PM, Igor Vaynberg <[email protected]> wrote:
> -0
>
> like i said in jira,
> a) it is dangerous to provide a method that is called after detach()
> because it can potentially reattach state. a lot more people are
> familiar with "destroy" rather then "detach" so without reading
> javadoc that seems like a better method to override - which is
> incorrect.
> b) this can still be accomplished by subclassing requestcycle's
> detach() and calling super first in the override.
>
> -igor
>
>
> On Mon, Jun 13, 2011 at 11:54 AM, Martijn Dashorst
> <[email protected]> wrote:
>> +1
>>
>> On Fri, Jun 10, 2011 at 10:52 AM, Emond Papegaaij
>> <[email protected]> wrote:
>>> Hi all,
>>>
>>> With the migration from Wicket 1.4 to 1.5, we tried to rewrite our custom
>>> request cycle code into IRequestCycleListeners. This worked for most of our
>>> code, except for one use-case: running code after everything is detached. In
>>> Wicket 1.4, it was possible to use the onAfterTargetsDetached for this, but 
>>> a
>>> similar method is not available in IRequestCycleListener.
>>>
>>> I opened a ticket for this (WICKET-3695), but it was closed by Igor. After a
>>> bit of discussion (see the issue), he suggested to start a vote here; so 
>>> here
>>> it is. We would like the addition of onDestroy to IRequestCycleListener, 
>>> which
>>> is called after everything is detached. This would serve to tear down 
>>> request
>>> state that is still needed during detaching.
>>>
>>> Best regards,
>>> Emond Papegaaij
>>>
>>
>>
>>
>> --
>> Become a Wicket expert, learn from the best: http://wicketinaction.com
>>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

Reply via email to