Author: ehillenius
Date: Thu Apr 12 22:27:19 2007
New Revision: 528359

URL: http://svn.apache.org/viewvc?view=rev&rev=528359
Log:
fixes and tweaks for request cycle creation

Modified:
    
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java
    
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
    
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java

Modified: 
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java?view=diff&rev=528359&r1=528358&r2=528359
==============================================================================
--- 
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java
 Thu Apr 12 22:27:19 2007
@@ -172,6 +172,8 @@
  * @author Eelco Hillenius
  * @author Igor Vaynberg (ivaynberg)
  */
+// TODO if it were up to me (Eelco), we could get rid of the application and
+// session members and accessors. They can be accessed from the thread locals
 public abstract class RequestCycle
 {
        /** Thread-local that holds the current request cycle. */

Modified: 
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java?view=diff&rev=528359&r1=528358&r2=528359
==============================================================================
--- 
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
 Thu Apr 12 22:27:19 2007
@@ -456,26 +456,6 @@
        }
 
        /**
-        * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT.
-        * 
-        * Creates a new RequestCycle for the given request and response using 
the
-        * session's request cycle factory.
-        * 
-        * @param application
-        *            The application
-        * @param request
-        *            The request
-        * @param response
-        *            The response
-        * @return The new request cycle.
-        */
-       public final RequestCycle newRequestCycle(final Application 
application, final Request request,
-                       final Response response)
-       {
-               return getRequestCycleFactory().newRequestCycle(application, 
request, response);
-       }
-
-       /**
         * Create a request cycle factory which is used by default by 
WebSession.
         * You may provide your own default factory by subclassing 
WebApplication
         * and overriding this method or your may subclass WebSession to create 
a
@@ -771,6 +751,23 @@
                return null;
        }
 
+       /**
+        * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT.
+        * 
+        * Creates a new RequestCycle for the given request and response using 
the
+        * application's request cycle factory.
+        * 
+        * @param request
+        *            The request
+        * @param response
+        *            The response
+        * @return The new request cycle.
+        */
+       final RequestCycle newRequestCycle(final Request request, final 
Response response)
+       {
+               return getRequestCycleFactory().newRequestCycle(this, request, 
response);
+       }
+       
        // TODO remove after deprecation release
 
        /**

Modified: 
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java?view=diff&rev=528359&r1=528358&r2=528359
==============================================================================
--- 
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
 (original)
+++ 
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
 Thu Apr 12 22:27:19 2007
@@ -240,8 +240,7 @@
                        try
                        {
                                // Create request cycle
-                               RequestCycle cycle = 
webApplication.newRequestCycle(webApplication, request,
-                                               response);
+                               RequestCycle cycle = 
webApplication.newRequestCycle(request, response);
 
                                try
                                {


Reply via email to