Author: jcompagner
Date: Mon Mar 31 00:56:03 2008
New Revision: 642917

URL: http://svn.apache.org/viewvc?rev=642917&view=rev
Log:
WICKET-1465 AjaxRequestTarget shouldn't throw exception when component is 
already removed from page (but log warning)

Modified:
    
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java

Modified: 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java?rev=642917&r1=642916&r2=642917&view=diff
==============================================================================
--- 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
 (original)
+++ 
wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
 Mon Mar 31 00:56:03 2008
@@ -689,8 +689,13 @@
                final Page page = component.getPage();
                if (page == null)
                {
-                       throw new IllegalStateException(
-                               "Ajax request attempted on a component that is 
not associated with a Page");
+                       // dont throw an exception but just ignore this 
component, somehow it got
+                       // removed from the page.
+                       // throw new IllegalStateException(
+                       // "Ajax request attempted on a component that is not 
associated with a Page");
+                       LOG.debug("component: " + component + " with markupid: 
" + markupId +
+                               " not rendered because it was already removed 
from page");
+                       return;
                }
 
                page.startComponentRender(component);


Reply via email to