[ 
https://issues.apache.org/jira/browse/WICKET-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664029#action_12664029
 ] 

Martin Grigorov commented on WICKET-2020:
-----------------------------------------

Looking at the code of o.a.w.RequestCycle I think you could do this yourself by 
extending WebRequestCycle, configure the new one by MyApp#newRequestCycle(), 
and the code should looks like:

@Override
public void detach() {
  onAfterTargetDetach();
  super.detach();
}

private void onAfterTargetDetach() {
  if (Application.DEVELOPMENT.equals(Application.get().getConfigurationType()) {
     // your logic here
  }
}

detach() is not part of the public API but since you use it only in development 
mode I think it is safe

> Callback after detaching the page but before the PageMap lock is released
> -------------------------------------------------------------------------
>
>                 Key: WICKET-2020
>                 URL: https://issues.apache.org/jira/browse/WICKET-2020
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.5
>            Reporter: Emond Papegaaij
>
> Currently, it is not possible to perform any checks on a page after the 
> request has been detached. In onEndRequest, the PageMap lock has already been 
> cleared, making it unsafe to access the pages involved in the request. Would 
> it be possible to add an extra callback method (ie. onAfterTargetDetach()) to 
> RequestCycle directly after detaching the request targets? We need such a 
> callback to check (in development mode) if all models are detached correctly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to