Does anybody know of reasons not to allow throwing a RRAIPE during
onBeforeRender?
Currently this is not possible but perhaps we should support it.
Consider the following use case
A Page with a LDM containing object x.
The Page has a link to delete x from the database, after delete
another Page is set as the responsePage.
Now if the user clicks on the backbutton of the browser the LDM tries
to reload object x from the database, which will not work because we
just deleted it.
So we detect this situation in the LDM#load method and throw a RRAIPE.
The problem is since load is triggered from onBeforeRender it is
caught by MarkupContainer#onBeforeRenderChildren() which is nice
enoygh to let all WicketRuntimeExceptions pass unmodified but wraps
every other Exception inside a WRE.
The problem here is that RRAIPE is not a WRE.

Possible solutions are make AbortException extends WRE, make WRE an
interface that is implemented by RRAIPE and modify the try-catch in
MarkupContainer#onBeforeRenderChildren to also let the RRAIPE pass
unmodified

WDYT?

Maurice

Reply via email to