[
https://issues.apache.org/jira/browse/WICKET-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Emond Papegaaij reopened WICKET-2020:
-------------------------------------
By overriding detach, it is only possible to insert code at the beginning or
end of the original method. That is not good enough for us. We want to check
the entire component hierarchy for database objects, to verify that all models
were detached correctly. For this, the component hierarchy must be detached
(1st block in detach), but the page map must not yet be released (4th block in
detach). Inserting code before super.detach() would execute our code too soon;
the models are not yet detached. Inserting code after super.detach() (or, as we
do it now, in onEndRequest()) is too late, because the page map is no longer
locked.
> 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
> Assignee: Juergen Donnerstag
> Fix For: 1.4-RC2
>
>
> 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.