You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2011/05/27 11:38:24 UTC

Pass RequestCycle to all methods in AbstractRequestCycleListener as context ?!

Hi,

Currently RequestCycle is passed to some of the methods in
org.apache.wicket.request.cycle.AbstractRequestCycleListener, others
don't have it.
Should we make it consistent and pass it always or never (the user app
can use RequestCycle.get()) ?

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

Re: Pass RequestCycle to all methods in AbstractRequestCycleListener as context ?!

Posted by Martin Grigorov <mg...@apache.org>.
I don't like it.
Then we'll have to introduce Application.getRequestHandlerListeners()
too and I'm not sure to which listeners to add AbstractRCL.

Additionally a user in IRC asked how to track which is the failed page
in onException() because he wanted to actually restart it after
failure, so he needed methods from "both" interfaces.

On Fri, May 27, 2011 at 1:35 PM, Andrea Del Bene <ad...@ciseonweb.it> wrote:
> Hi,
>
> I don't know if what I'm suggesting is feasible, but woudn't be better
> splitting the current IRequestCycleListener into:
>
> -a IRequestCycleListener interface with methods that use RequestCycle
> (onBeginRequest, onEndRequest, etc...)
> -a new IRequestHandlerListener interface with methods that use
> IRequestHandler (onRequestHandlerResolved, onRequestHandlerScheduled, etc..)
>
> ?
>
> AbstractRequestCycleListener would implement both of them.
> Just my two cents....
>>
>> Hi,
>>
>> Currently RequestCycle is passed to some of the methods in
>> org.apache.wicket.request.cycle.AbstractRequestCycleListener, others
>> don't have it.
>> Should we make it consistent and pass it always or never (the user app
>> can use RequestCycle.get()) ?
>>
>
>



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

Re: Pass RequestCycle to all methods in AbstractRequestCycleListener as context ?!

Posted by Andrea Del Bene <ad...@ciseonweb.it>.
Hi,

I don't know if what I'm suggesting is feasible, but woudn't be better 
splitting the current IRequestCycleListener into:

-a IRequestCycleListener interface with methods that use RequestCycle 
(onBeginRequest, onEndRequest, etc...)
-a new IRequestHandlerListener interface with methods that 
use IRequestHandler (onRequestHandlerResolved, 
onRequestHandlerScheduled, etc..)

?

AbstractRequestCycleListener would implement both of them.
Just my two cents....
> Hi,
>
> Currently RequestCycle is passed to some of the methods in
> org.apache.wicket.request.cycle.AbstractRequestCycleListener, others
> don't have it.
> Should we make it consistent and pass it always or never (the user app
> can use RequestCycle.get()) ?
>


Re: Pass RequestCycle to all methods in AbstractRequestCycleListener as context ?!

Posted by Igor Vaynberg <ig...@gmail.com>.
https://issues.apache.org/jira/browse/WICKET-3748

-igor

On Fri, May 27, 2011 at 2:38 AM, Martin Grigorov <mg...@apache.org> wrote:
> Hi,
>
> Currently RequestCycle is passed to some of the methods in
> org.apache.wicket.request.cycle.AbstractRequestCycleListener, others
> don't have it.
> Should we make it consistent and pass it always or never (the user app
> can use RequestCycle.get()) ?
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>