(no commit message)
[utils] / wicket / components / src / main / java / org / wamblee / wicket / page / WebApplicationBasePage.java
index 97e41a04c066cc6bdf59d6cbd134781e3aa95690..b0ac386d13351b747faa4f604279dbb316fc9c01 100644 (file)
@@ -16,7 +16,6 @@
 package org.wamblee.wicket.page;
 
 import javax.persistence.EntityManager;
-import javax.transaction.UserTransaction;
 
 import org.apache.wicket.IPageMap;
 import org.apache.wicket.PageParameters;
@@ -42,6 +41,8 @@ public class WebApplicationBasePage extends WebPage {
 
     protected WebApplicationBasePage() {
         super();
+
+        setEnabled(false);
         init();
     }
 
@@ -91,17 +92,6 @@ public class WebApplicationBasePage extends WebPage {
         addBehavior(new ExpirePageImmediatelyBehavior());
     }
 
-    /**
-     * Flushes the entitymanager immedately after rendering to make sure that
-     * errors are caught early.
-     * 
-     * @param aEntityManager
-     *            Contextual reference to an entity manager.
-     */
-    protected void flushEntityManagerAfterRender(EntityManager aEntityManager) {
-        addBehavior(new FlushEntityManagerBehavior(aEntityManager));
-    }
-
     /**
      * Adds a specific behavior to the page.
      * 
@@ -129,7 +119,7 @@ public class WebApplicationBasePage extends WebPage {
         super.onAfterRender();
         behaviors.onAfterRender(this);
     }
-    
+
     @Override
     protected void onDetach() {
         super.onDetach();