Author: hlship
Date: Sat Mar 1 09:57:34 2008
New Revision: 632638
URL: http://svn.apache.org/viewvc?rev=632638&view=rev
Log:
TAPESTRY-2196: Protected field in a component class does not generate an
understandable exception, instead NoClassDefFound
Added:
tapestry/tapestry5/trunk/tapestry-core/src/test/app1/IndirectProtectedFields.tml
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/test/app1/Start.tml
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/IntegrationTests.java
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/IndirectProtectedFields.java
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/Start.java
Added:
tapestry/tapestry5/trunk/tapestry-core/src/test/app1/IndirectProtectedFields.tml
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/IndirectProtectedFields.tml?rev=632638&view=auto
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/test/app1/IndirectProtectedFields.tml
(added)
+++
tapestry/tapestry5/trunk/tapestry-core/src/test/app1/IndirectProtectedFields.tml
Sat Mar 1 09:57:34 2008
@@ -0,0 +1,12 @@
+<html t:type="Border"
+ xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
+
+ <h1>Protected Fields Demo</h1>
+
+ <p>
+ <t:actionlink t:id="go">Trigger the Exception</t:actionlink>
+ </p>
+
+
+</html>
+
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/Start.tml
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/Start.tml?rev=632638&r1=632637&r2=632638&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/app1/Start.tml (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/app1/Start.tml Sat Mar 1
09:57:34 2008
@@ -51,11 +51,6 @@
-- using a List for catch-all event context parameters
</li>
- <li>
- <a href="indirectprotectedfields">Protected Fields Demo</a>
- -- page that contains protected fields
- </li>
-
</ul>
</html>
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/IntegrationTests.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/IntegrationTests.java?rev=632638&r1=632637&r2=632638&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/IntegrationTests.java
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/IntegrationTests.java
Sat Mar 1 09:57:34 2008
@@ -1829,7 +1829,7 @@
@Test
public void protected_field_in_page_class()
{
- start("Protected Fields Demo");
+ start("Protected Fields Demo", "Trigger the Exception");
assertTextPresent("An unexpected application exception has occurred.",
"Class
org.apache.tapestry.integration.app1.pages.ProtectedFields contains field(s)
(_field) that are not private. You should change these fields to private, and
add accessor methods if needed.");
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/IndirectProtectedFields.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/IndirectProtectedFields.java?rev=632638&r1=632637&r2=632638&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/IndirectProtectedFields.java
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/IndirectProtectedFields.java
Sat Mar 1 09:57:34 2008
@@ -21,7 +21,7 @@
@InjectPage
private ProtectedFields _protectedFields;
- Object onActivate()
+ Object onActionFromGo()
{
return _protectedFields;
}
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/Start.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/Start.java?rev=632638&r1=632637&r2=632638&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/Start.java
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/pages/Start.java
Sat Mar 1 09:57:34 2008
@@ -244,6 +244,8 @@
new Item("TrackEditor", "Generic Page Class Demo",
"demo use of generics with component classes and,
particularily, with property types"),
+ new Item("IndirectProtectedFields", "Protected Fields Demo", "demo
exception when component class contains protected fields"),
+
new Item("injectcomponentdemo", "Inject Component Demo",
"inject component defined in template"));