Author: knopp
Date: Thu Sep 25 11:17:45 2008
New Revision: 699037
URL: http://svn.apache.org/viewvc?rev=699037&view=rev
Log:
WICKET-1845
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/Page.java
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/Page.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/Page.java?rev=699037&r1=699036&r2=699037&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/Page.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/Page.java Thu Sep 25
11:17:45 2008
@@ -727,6 +727,19 @@
}
/**
+ * Determine the "statelessness" of the page while not changing the
cached value.
+ *
+ * @return boolean value
+ */
+ private boolean peekPageStateless()
+ {
+ Boolean old = stateless;
+ Boolean res = isPageStateless();
+ stateless = old;
+ return res;
+ }
+
+ /**
* Gets whether the page is stateless. Components on stateless page
must not render any
* statefull urls, and components on statefull page must not render any
stateless urls.
* Statefull urls are urls, which refer to a certain (current) page
instance.
@@ -1445,7 +1458,7 @@
// If any of the components on page is not stateless, we need
to bind the session
// before we start rendering components, as then jsessionid
won't be appended
// for links rendered before first stateful component
- if (getSession().isTemporary() && !isPageStateless())
+ if (getSession().isTemporary() && !peekPageStateless())
{
getSession().bind();
}