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

Hudson commented on WICKET-3302:
--------------------------------

Integrated in Apache Wicket 1.4.x #367 (See 
[https://hudson.apache.org/hudson/job/Apache%20Wicket%201.4.x/367/])
    Issue: WICKET-3302


> 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
>             Fix For: 1.4.16, 1.5-M4
>
>
> 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