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

David Shepherdson commented on WICKET-1465:
-------------------------------------------

This won't actually fix the problem, though, will it? It seems to me that 
component.getPage() will never return null, but would instead throw the same 
IllegalStateException:

        public final Page getPage()
        {
                // Search for nearest Page
                final Page page = findPage();

                // If no Page was found
                if (page == null)
                {
                        // Give up with a nice exception
                        throw new IllegalStateException("No Page found for 
component " + this);
                }

                return page;
        }


In that case, wouldn't AjaxRequestTarget be better off catching the 
IllegalStateException from getPage() and printing its debug message instead?

(By the way, I like the comment about it being a 'nice' exception in the code 
above... ;-))

> AjaxRequestTarget shouldn't throw exception when component is already removed 
> from page (but log warning)
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1465
>                 URL: https://issues.apache.org/jira/browse/WICKET-1465
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.2
>            Reporter: Johan Compagner
>            Assignee: Johan Compagner
>             Fix For: 1.3.3
>
>


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