Author: jcompagner
Date: Tue Mar 17 11:39:25 2009
New Revision: 755200
URL: http://svn.apache.org/viewvc?rev=755200&view=rev
Log:
Only send an empty ajax request target if it must ignore the request because
the active page is not the right one
if the pagemap cant be found it is a pageexpire
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java
Modified:
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java?rev=755200&r1=755199&r2=755200&view=diff
==============================================================================
---
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java
(original)
+++
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java
Tue Mar 17 11:39:25 2009
@@ -77,7 +77,7 @@
else if (requestParameters.getComponentPath() != null)
{
// marks whether or not we will be processing this
request
- boolean processRequest = true;
+ int processRequest = 0; // 0 == process, 1 == page
expired, 2 == not active page anymore
synchronized (requestCycle.getSession())
{
// we need to check if this request has been
flagged as
@@ -95,7 +95,7 @@
{
// requested pagemap no longer
exists - ignore this
// request
- processRequest = false;
+ processRequest = 1;
}
else if (pageMap instanceof
AccessStackPageMap)
{
@@ -111,7 +111,7 @@
{
// the page is
no longer the active page
// - ignore
this request
- processRequest
= false;
+ processRequest
= 2;
}
else
{
@@ -121,7 +121,7 @@
{
//
version is no longer the active version -
//
ignore this request
-
processRequest = false;
+
processRequest = 2;
}
}
}
@@ -132,7 +132,7 @@
}
}
}
- if (processRequest)
+ if (processRequest == 0)
{
try
{
@@ -146,7 +146,8 @@
else
{
Request request = requestCycle.getRequest();
- if (request instanceof WebRequest &&
((WebRequest)request).isAjax())
+ if (request instanceof WebRequest &&
((WebRequest)request).isAjax() &&
+ processRequest == 2)
{
// if processRequest is false in an
ajax request just have an empty ajax target
target =
EmptyAjaxRequestTarget.getInstance();