Author: ivaynberg
Date: Wed Jan  3 08:58:46 2007
New Revision: 492221

URL: http://svn.apache.org/viewvc?view=rev&rev=492221
Log:
WICKET-156

Modified:
    incubator/wicket/trunk/wicket/src/main/java/wicket/Component.java
    incubator/wicket/trunk/wicket/src/main/java/wicket/Page.java

Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/Component.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/Component.java?view=diff&rev=492221&r1=492220&r2=492221
==============================================================================
--- incubator/wicket/trunk/wicket/src/main/java/wicket/Component.java (original)
+++ incubator/wicket/trunk/wicket/src/main/java/wicket/Component.java Wed Jan  
3 08:58:46 2007
@@ -3030,6 +3030,7 @@
         */
        protected void onDetach()
        {
+               detachModels();
                setFlag(FLAG_DETACHING, false);
        }
 

Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/Page.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/Page.java?view=diff&rev=492221&r1=492220&r2=492221
==============================================================================
--- incubator/wicket/trunk/wicket/src/main/java/wicket/Page.java (original)
+++ incubator/wicket/trunk/wicket/src/main/java/wicket/Page.java Wed Jan  3 
08:58:46 2007
@@ -402,33 +402,6 @@
        }
 
        /**
-        * Detaches any attached models referenced by this page.
-        */
-       @Override
-       public void detachModels()
-       {
-               // visit all this page's children to detach the models
-               visitChildren(new IVisitor()
-               {
-                       public Object component(Component component)
-                       {
-                               try
-                               {
-                                       // detach any models of the component
-                                       component.detachModels();
-                               }
-                               catch (Exception e) // catch anything; we MUST 
detach all models
-                               {
-                                       log.error("detaching models of 
component " + component + " failed:", e);
-                               }
-                               return IVisitor.CONTINUE_TRAVERSAL;
-                       }
-               });
-
-               super.detachModels();
-       }
-
-       /**
         * Mark this page as dirty in the session
         */
        public final void dirty()


Reply via email to