You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by eh...@apache.org on 2007/03/11 03:21:05 UTC
svn commit: r516846 -
/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/RequestCycle.java
Author: ehillenius
Date: Sat Mar 10 18:21:05 2007
New Revision: 516846
URL: http://svn.apache.org/viewvc?view=rev&rev=516846
Log:
WICKET-366
Modified:
incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/RequestCycle.java
Modified: incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/RequestCycle.java
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/RequestCycle.java?view=diff&rev=516846&r1=516845&r2=516846
==============================================================================
--- incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/RequestCycle.java (original)
+++ incubator/wicket/branches/wicket-1.x/wicket/src/main/java/wicket/RequestCycle.java Sat Mar 10 18:21:05 2007
@@ -214,6 +214,21 @@
return (RequestCycle)current.get();
}
+ /**
+ * Sets the request cycle for the calling thread. You typically DO NOT NEED
+ * to call this method, as the request cycle is set to current for you in
+ * the constructor. However, if you have a <a
+ * href="http://issues.apache.org/jira/browse/WICKET-366">very special need</a>
+ * to set it to something else, you can expose this method.
+ *
+ * @param cycle
+ * The request cycle to set current
+ */
+ protected static void set(RequestCycle cycle)
+ {
+ current.set(cycle);
+ }
+
/** The application object. */
protected final Application application;
@@ -252,7 +267,8 @@
private boolean updateSession;
/**
- * Constructor.
+ * Constructor. This instance will be set as the current one for this
+ * thread.
*
* @param session
* The session
@@ -274,6 +290,7 @@
current.set(this);
}
+
/**
* Gets the application object.
*
@@ -1074,7 +1091,7 @@
// probably our last chance the exception can be logged.
// Note that a PageExpiredException should not be logged, because
// it's not an internal error
- if (! (e instanceof PageExpiredException))
+ if (!(e instanceof PageExpiredException))
{
log.error(e.getMessage(), e);
}