[ 
https://issues.apache.org/jira/browse/WICKET-3302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Vaynberg reassigned WICKET-3302:
-------------------------------------

    Assignee: Igor Vaynberg

> Endless recursion if LoadableDetachableModel.load throws exception
> ------------------------------------------------------------------
>
>                 Key: WICKET-3302
>                 URL: https://issues.apache.org/jira/browse/WICKET-3302
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: Willis Blackburn
>            Assignee: Igor Vaynberg
>
> I don't know if there's any easy fix for this, but here's what happens:
> 1. Component subclass overrides isVisible with a new implementation that 
> depends on the current model state.
> 2. The model is a LoadableDetachableModel.
> 3. On the initial render, the load method of the LoadableDetachableModel 
> throws a RuntimeException for whatever reason.  (In my case I was trying to 
> throw a AbortWithHttpErrorCodeException.)
> 4. This gets caught in Component.getDefaultModelObject:
>     log.error("Error while getting default model object for Component: " + 
> this.toString(true));
> 5.  The toString method that's invoked from the exception handler prints the 
> component's state, including its visibility.
> 6.  In order to resolve the visibility state, toString has to call 
> isVisible--the same method that initially caused the exception.
> 7.  The isVisible method again throws an exception, etc.

-- 
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