[jira] [Commented] (TAP5-2070) Respond with a HTTP 404 if the page is activated with an activation context not explicitly supported by the page itself

2013-08-06 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/TAP5-2070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13731003#comment-13731003
 ] 

Hudson commented on TAP5-2070:
--

FAILURE: Integrated in tapestry-trunk-freestyle #1128 (See 
[https://builds.apache.org/job/tapestry-trunk-freestyle/1128/])
TAP5-2070 fix some tests (mlusetti: rev 
6460e445c58dc53b23f0c749b9c1cea58e093f36)
* 
tapestry-core/src/test/java/org/apache/tapestry5/internal/structure/ComponentPageElementImplTest.java
* 
tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventImplTest.java


> Respond with a HTTP 404 if the page is activated with an activation context 
> not explicitly supported by the page itself
> ---
>
> Key: TAP5-2070
> URL: https://issues.apache.org/jira/browse/TAP5-2070
> Project: Tapestry 5
>  Issue Type: Improvement
>  Components: tapestry-core
>Affects Versions: 5.4
>Reporter: Massimo Lusetti
>Assignee: Massimo Lusetti
>
> The behavior from day one for pages within Tapestry is to being able to serve 
> requests that come with an activation context with more parameters that the 
> ones declared by the page itself.
> This feature lead the framework to serve requests that comes to URL which are 
> not explicitly declared by the pages, for example a page named: Super with an 
> activation event handler method like this one:
> onActivate(String character) { ... }
> will finely serve requests for:
> /super/mario
> /super/luigi
> /super/wario
> /super/waluigi
> but it will also serve requests for:
> /super/mario/luigi/wario/waluigi
> This issue is to change that behavior.
> If the page does declare a specific activation event handler method the 
> corresponding serving URLs should adhere strictly, otherwise a HTTP 404 is 
> raised.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[2/2] git commit: TAP5-2070 fix some tests

2013-08-06 Thread mlusetti
TAP5-2070 fix some tests


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/6460e445
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/6460e445
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/6460e445

Branch: refs/heads/master
Commit: 6460e445c58dc53b23f0c749b9c1cea58e093f36
Parents: 974adcc
Author: Massimo Lusetti 
Authored: Tue Aug 6 18:43:37 2013 +0200
Committer: Massimo Lusetti 
Committed: Tue Aug 6 18:43:37 2013 +0200

--
 .../services/ComponentEventImplTest.java| 39 ++--
 .../structure/ComponentPageElementImplTest.java | 11 --
 2 files changed, 35 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/6460e445/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventImplTest.java
--
diff --git 
a/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventImplTest.java
 
b/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventImplTest.java
index 9eb353b..4629bb6 100644
--- 
a/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventImplTest.java
+++ 
b/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventImplTest.java
@@ -20,6 +20,7 @@ import org.apache.tapestry5.TapestryMarkers;
 import org.apache.tapestry5.internal.structure.ComponentPageElementResources;
 import org.apache.tapestry5.internal.test.InternalBaseTestCase;
 import org.apache.tapestry5.ioc.Invokable;
+import org.apache.tapestry5.model.ComponentModel;
 import org.apache.tapestry5.runtime.ComponentEvent;
 import org.easymock.EasyMock;
 import org.easymock.IAnswer;
@@ -55,6 +56,7 @@ public class ComponentEventImplTest extends 
InternalBaseTestCase
 ComponentEventCallback handler = mockComponentEventHandler();
 EventContext context = mockEventContext();
 Logger logger = mockLogger();
+   ComponentModel model = mockComponentModel();
 
 train_isDebugEnabled(logger, false);
 
@@ -62,7 +64,7 @@ public class ComponentEventImplTest extends 
InternalBaseTestCase
 
 replay();
 
-ComponentEvent event = new ComponentEventImpl("eventType", "someId", 
context, handler, null, false, mockComponentModel(), logger);
+ComponentEvent event = new ComponentEventImpl("eventType", "someId", 
context, handler, null, false, model, logger);
 
 assertTrue(event.matches("eventType", "someId", 0));
 assertFalse(event.matches("foo", "someId", 0));
@@ -81,6 +83,7 @@ public class ComponentEventImplTest extends 
InternalBaseTestCase
 Logger logger = mockLogger();
 Object result = new Object();
 ComponentPageElementResources resources = mockResources();
+   ComponentModel model = mockComponentModel();
 
 train_isDebugEnabled(logger, false);
 
@@ -88,7 +91,7 @@ public class ComponentEventImplTest extends 
InternalBaseTestCase
 
 replay();
 
-ComponentEvent event = new ComponentEventImpl("eventType", "someId", 
context, handler, resources, false, mockComponentModel(), logger);
+ComponentEvent event = new ComponentEventImpl("eventType", "someId", 
context, handler, resources, false, model, logger);
 
 event.storeResult(result);
 
@@ -104,6 +107,7 @@ public class ComponentEventImplTest extends 
InternalBaseTestCase
 ComponentEventCallback handler = mockComponentEventHandler();
 EventContext context = mockEventContext();
 Logger logger = mockLogger();
+   ComponentModel model = mockComponentModel();
 
 train_isDebugEnabled(logger, false);
 
@@ -111,7 +115,7 @@ public class ComponentEventImplTest extends 
InternalBaseTestCase
 
 replay();
 
-ComponentEvent event = new ComponentEventImpl("eventType", "someId", 
context, handler, null, false, mockComponentModel(), logger);
+ComponentEvent event = new ComponentEventImpl("eventType", "someId", 
context, handler, null, false, model, logger);
 
 assertTrue(event.matches("EVENTTYPE", "someid", 0));
 
@@ -124,6 +128,7 @@ public class ComponentEventImplTest extends 
InternalBaseTestCase
 ComponentEventCallback handler = mockComponentEventHandler();
 EventContext context = mockEventContext();
 Logger logger = mockLogger();
+   ComponentModel model = mockComponentModel();
 
 train_isDebugEnabled(logger, false);
 
@@ -131,7 +136,7 @@ public class ComponentEventImplTest extends 
InternalBaseTestCase
 
 replay();
 
-ComponentEvent event = new ComponentEventImpl("eventType", "someId", 
context, handler, null, false, mockComponentModel(), logger);
+ComponentE

[1/2] git commit: Fix javadoc to reflect actual behavior

2013-08-06 Thread mlusetti
Updated Branches:
  refs/heads/master a9173f9a7 -> 6460e445c


Fix javadoc to reflect actual behavior


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/974adcc7
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/974adcc7
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/974adcc7

Branch: refs/heads/master
Commit: 974adcc72cc3e89b88e0d5a27c353de89781f5dc
Parents: a9173f9
Author: Massimo Lusetti 
Authored: Tue Aug 6 11:45:58 2013 +0200
Committer: Massimo Lusetti 
Committed: Tue Aug 6 11:45:58 2013 +0200

--
 .../org/apache/tapestry5/annotations/PageActivationContext.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/974adcc7/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageActivationContext.java
--
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageActivationContext.java
 
b/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageActivationContext.java
index 19938de..9d70f5c 100644
--- 
a/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageActivationContext.java
+++ 
b/tapestry-core/src/main/java/org/apache/tapestry5/annotations/PageActivationContext.java
@@ -28,8 +28,7 @@ import org.apache.tapestry5.ioc.annotations.UseWith;
  * In order to use this annotation you must contribute a {@link 
org.apache.tapestry5.ValueEncoder} for the class of the
  * annotated property.
  * 
- * You should not use this annotation within a class that already has an 
onActivate() or onPassivate() method; doing so
- * will result in a runtime exception.
+ * You should not use this annotation more than once per page class; doing it 
will result in a runtime exception.
  */
 @Target(FIELD)
 @Documented