You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jc...@apache.org on 2009/02/18 13:30:16 UTC
svn commit: r745495 -
/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java
Author: jcompagner
Date: Wed Feb 18 12:30:16 2009
New Revision: 745495
URL: http://svn.apache.org/viewvc?rev=745495&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/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java
Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java?rev=745495&r1=745494&r2=745495&view=diff
==============================================================================
--- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java (original)
+++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java Wed Feb 18 12:30:16 2009
@@ -76,7 +76,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
@@ -94,7 +94,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();