Order of IRequestCycleListener invocations
------------------------------------------

                 Key: WICKET-3625
                 URL: https://issues.apache.org/jira/browse/WICKET-3625
             Project: Wicket
          Issue Type: Improvement
          Components: wicket-core
    Affects Versions: 1.5-RC3
            Reporter: Emond Papegaaij


The way event methods on the IRequestCycleListener are invoked, makes it 
difficult to implement a 'setup-teardown' listener. It would be nice if 
IRequestCycleListeners are invoked from front to end for 'setup'-methods and 
from end to front for 'teardown'-methods. For example, in our application, we 
setup a user context at the start of a request and tear it down at the end. We 
want this listener to be the first to be invoked for 'onBeginRequest' and the 
last for 'onEndRequest'. I think this will be quite common for other 
implementations of IRequestCycleListener as well.

I propose for the following methods the listeners are executed from first to 
last: onBeginRequest, onException, onRequestHandlerScheduled
and from last to first for: onEndRequest, onDetach, onRequestHandlerResolved, 
onExceptionRequestHandlerResolved

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to