Author: ivaynberg
Date: Thu Jan 25 10:01:26 2007
New Revision: 499873

URL: http://svn.apache.org/viewvc?view=rev&rev=499873
Log:
remove page.before/afterlistener()

Modified:
    incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/Page.java
    
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/RequestListenerInterface.java
    
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/request/target/component/listener/BehaviorRequestTarget.java
    
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/request/target/resource/ComponentResourceRequestTarget.java

Modified: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/Page.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/Page.java?view=diff&rev=499873&r1=499872&r2=499873
==============================================================================
--- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/Page.java 
(original)
+++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/Page.java 
Thu Jan 25 10:01:26 2007
@@ -245,41 +245,6 @@
        }
 
        /**
-        * Called right after a component's listener method (the provided method
-        * argument) was called. This method may be used to clean up 
dependencies,
-        * do logging, etc. NOTE: this method will also be called when
-        * [EMAIL PROTECTED] WebPage#beforeCallComponent(Component, 
RequestListenerInterface)}
-        * or the method invocation itself failed.
-        * 
-        * @param component
-        *            the component that is to be called
-        * @param listener
-        *            the listener of that component that is to be called
-        */
-       public void afterCallComponent(final Component component,
-                       final RequestListenerInterface listener)
-       {
-       }
-
-       /**
-        * Called just before a component's listener method (the provided method
-        * argument) is called. This method may be used to set up dependencies,
-        * enforce authorization, etc. NOTE: if this method fails, the method 
will
-        * not be excuted. Method
-        * [EMAIL PROTECTED] WebPage#afterCallComponent(Component, 
RequestListenerInterface)}
-        * will always be called.
-        * 
-        * @param component
-        *            the component that is to be called
-        * @param listener
-        *            the listener of that component that is to be called
-        */
-       public void beforeCallComponent(final Component component,
-                       final RequestListenerInterface listener)
-       {
-       }
-
-       /**
         * @see wicket.MarkupContainer#internalDetach()
         */
        public void internalDetach()

Modified: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/RequestListenerInterface.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/RequestListenerInterface.java?view=diff&rev=499873&r1=499872&r2=499873
==============================================================================
--- 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/RequestListenerInterface.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/RequestListenerInterface.java
 Thu Jan 25 10:01:26 2007
@@ -154,8 +154,6 @@
         */
        public final void invoke(final Page page, final Component component)
        {
-               page.beforeCallComponent(component, this);
-
                try
                {
                        // Invoke the interface method on the component
@@ -164,9 +162,9 @@
                catch (InvocationTargetException e)
                {
                        // Honor redirect exception contract defined in 
IPageFactory
-                       if (e.getTargetException() instanceof 
AbstractRestartResponseException || 
-                                       e.getTargetException() instanceof 
AuthorizationException ||
-                                       e.getTargetException() instanceof 
WicketRuntimeException)
+                       if (e.getTargetException() instanceof 
AbstractRestartResponseException
+                                       || e.getTargetException() instanceof 
AuthorizationException
+                                       || e.getTargetException() instanceof 
WicketRuntimeException)
                        {
                                throw (RuntimeException)e.getTargetException();
                        }
@@ -179,10 +177,6 @@
                        throw new WicketRuntimeException("Method " + 
method.getName() + " of "
                                        + method.getDeclaringClass() + " 
targeted at component " + component
                                        + " threw an exception", e);
-               }
-               finally
-               {
-                       page.afterCallComponent(component, this);
                }
        }
 

Modified: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/request/target/component/listener/BehaviorRequestTarget.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/request/target/component/listener/BehaviorRequestTarget.java?view=diff&rev=499873&r1=499872&r2=499873
==============================================================================
--- 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/request/target/component/listener/BehaviorRequestTarget.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/request/target/component/listener/BehaviorRequestTarget.java
 Thu Jan 25 10:01:26 2007
@@ -93,16 +93,8 @@
                                        + "; Component: " + 
component.toString());
                }
 
-               component.getPage().beforeCallComponent(component, 
IBehaviorListener.INTERFACE);
-               try
-               {
-                       // Invoke the interface method
-                       behaviorListener.onRequest();
-               }
-               finally
-               {
-                       component.getPage().afterCallComponent(component, 
IBehaviorListener.INTERFACE);
-               }
+               // Invoke the interface method
+               behaviorListener.onRequest();
 
        }
 }

Modified: 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/request/target/resource/ComponentResourceRequestTarget.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/request/target/resource/ComponentResourceRequestTarget.java?view=diff&rev=499873&r1=499872&r2=499873
==============================================================================
--- 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/request/target/resource/ComponentResourceRequestTarget.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/request/target/resource/ComponentResourceRequestTarget.java
 Thu Jan 25 10:01:26 2007
@@ -64,8 +64,6 @@
         */
        public void respond(RequestCycle requestCycle)
        {
-               page.beforeCallComponent(component, listener);
-
                try
                {
                        // Invoke the interface method on the component
@@ -89,10 +87,6 @@
                                                + 
listener.getMethod().getDeclaringClass() + " targetted at component "
                                                + component + " threw an 
exception", e);
                        }
-               }
-               finally
-               {
-                       page.afterCallComponent(component, listener);
                }
        }
 


Reply via email to