You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by th...@apache.org on 2014/12/07 03:29:03 UTC
[05/45] tapestry-5 git commit: TAP-2388: Reset state to allow an
Error404 to display after an unknown component id in a component event
request
TAP-2388: Reset state to allow an Error404 to display after an unknown component id in a component event request
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/a43e17ff
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/a43e17ff
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/a43e17ff
Branch: refs/heads/beanmodel-split
Commit: a43e17ff940e411e20c4ba7b39cd98f36a3f2f01
Parents: 3257161
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Oct 24 14:27:27 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Oct 24 14:27:27 2014 -0700
----------------------------------------------------------------------
.../tapestry5/internal/services/ComponentEventDispatcher.java | 3 +++
.../apache/tapestry5/internal/services/PageRenderDispatcher.java | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/a43e17ff/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java
index 1d0bd5d..555ff39 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventDispatcher.java
@@ -49,6 +49,9 @@ public class ComponentEventDispatcher implements Dispatcher
// ... in which case, this attribute is set.
if (request.getAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND) != null) {
+ // This needs to be cleared out because the container may submit a request back into the filter
+ // for the 404 page and some containers reuse the existing HttpServletRequest. See TAP5-2388.
+ request.setAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND, null);
return false;
}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/a43e17ff/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java
index 1fb7b3e..2e9e255 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PageRenderDispatcher.java
@@ -38,7 +38,7 @@ public class PageRenderDispatcher implements Dispatcher
{
// If a component event request arrives (in production)
// with an invalid component id, then we want it to be a 404
- // See TAP5-1481
+ // See TAP5-1481 and TAP5-2388
if (request.getAttribute(InternalConstants.REFERENCED_COMPONENT_NOT_FOUND) != null)
{