Author: hlship
Date: Mon Apr 19 13:18:00 2010
New Revision: 935552
URL: http://svn.apache.org/viewvc?rev=935552&view=rev
Log:
TAP5-1001: Garbled exception message when a component is defined in a namespace
that is not properly defined as a Tapestry library namespace
Added:
tapestry/tapestry5/trunk/tapestry-core/src/test/app1/NoTypeProvidedDemo.tml
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FailureTests.java
(with props)
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/NoTypeProvidedDemo.java
(with props)
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/internal/pageload/PageloadStrings.properties
tapestry/tapestry5/trunk/tapestry-core/src/test/app1/Index.tml
tapestry/tapestry5/trunk/tapestry-core/src/test/conf/testng-limited.xml
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/internal/pageload/PageloadStrings.properties
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/internal/pageload/PageloadStrings.properties?rev=935552&r1=935551&r2=935552&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/internal/pageload/PageloadStrings.properties
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/internal/pageload/PageloadStrings.properties
Mon Apr 19 13:18:00 2010
@@ -1,5 +1,5 @@
#
-# Copyright 2009 The Apache Software Foundation
+# Copyright 2009, 2010 The Apache Software Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -16,7 +16,8 @@
unique_mixin_required=Mixins applied to a component must be unique. Mixin '%s'
has already been applied.
mixinid_for_paramnotfound="Mixin id for parameter '%s' not found. Attached
mixins: %s."
-missing_component_type=You must specify the type via t:type, the element, or
@Componentno_more_tokens=No more template tokens.
+missing_component_type=You must specify the type via t:type, the element, or
@Component annotation.
+no_more_tokens=No more template tokens.
could_not_find_override=Could not find an override for extension point '%s'.
no_parent_for_extension=Component %s uses an extension template, but does not
have a parent component.
token_not_implemented=Not yet implemented: %s
@@ -33,7 +34,7 @@ embedded_components_not_in_template=Embe
(or a super-class of %s), but are not
present in the component template (%s).
parameter_already_published=Parameter '%s' of embedded component '%s' can not
be published as a parameter of component \
%s, as it has previously been published by
embedded component '%s'.
-failure_creating_embedded_component=Failure creating embedded component '%s'
of %s: %s"
+failure_creating_embedded_component=Failure creating embedded component '%s'
of %s: %s
published_parameter_nonexistant=Parameter '%s' of component %s is improperly
published from embedded component '%s' \
(where it does not exist). This may be a typo
in the publishParameters attribute of \
the @Component annotation.
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/Index.tml
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/Index.tml?rev=935552&r1=935551&r2=935552&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/app1/Index.tml (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/app1/Index.tml Mon Apr 19
13:18:00 2010
@@ -147,6 +147,10 @@
<a href="InvalidComponentTypeDemo">Invalid Component Type</a>
-- unknown type of component in template
</li>
+ <li>
+ <a href="NoTypeProvidedDemo">No Component Type Provided</a> --
+ component type not defined.
+ </li>
</ul>
</html>
Added:
tapestry/tapestry5/trunk/tapestry-core/src/test/app1/NoTypeProvidedDemo.tml
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/NoTypeProvidedDemo.tml?rev=935552&view=auto
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/app1/NoTypeProvidedDemo.tml
(added)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/app1/NoTypeProvidedDemo.tml
Mon Apr 19 13:18:00 2010
@@ -0,0 +1,5 @@
+<html t:type="Border"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
+
+ <span t:id="noTypeProvided"/>
+
+</html>
\ No newline at end of file
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/test/conf/testng-limited.xml
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/conf/testng-limited.xml?rev=935552&r1=935551&r2=935552&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/conf/testng-limited.xml
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/conf/testng-limited.xml Mon
Apr 19 13:18:00 2010
@@ -11,8 +11,7 @@
<class name="org.apache.tapestry5.test.SeleniumLauncher"/>
<!-- Modify classes below as needed. -->
- <class name="org.apache.tapestry5.integration.app1.AjaxTests"/>
- <class name="org.apache.tapestry5.integration.app1.FormTests"/>
+ <class name="org.apache.tapestry5.integration.app1.FailureTests"/>
</classes>
</test>
Added:
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FailureTests.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FailureTests.java?rev=935552&view=auto
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FailureTests.java
(added)
+++
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FailureTests.java
Mon Apr 19 13:18:00 2010
@@ -0,0 +1,39 @@
+// Copyright 2010 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.apache.tapestry5.integration.app1;
+
+import org.apache.tapestry5.integration.TapestryCoreTestCase;
+import org.testng.annotations.Test;
+
+/**
+ * Tests for various kinds of failure conditions. Generally, what's being
tested is that the exception
+ * is being reported correctly.
+ */
+public class FailureTests extends TapestryCoreTestCase
+{
+ /**
+ * With lt;span t:id="foo"/> in the template, there should be an
@Component
+ * in the Java class. When there's not, it's an error.
+ */
+ @Test
+ public void component_id_in_template_with_no_type()
+ {
+ clickThru("No Component Type Provided");
+
+
assertTextPresent("org.apache.tapestry5.integration.app1.pages.NoTypeProvidedDemo",
+ "You must specify the type via t:type, the element, or
@Component annotation.");
+ }
+
+}
Propchange:
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FailureTests.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/NoTypeProvidedDemo.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/NoTypeProvidedDemo.java?rev=935552&view=auto
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/NoTypeProvidedDemo.java
(added)
+++
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/NoTypeProvidedDemo.java
Mon Apr 19 13:18:00 2010
@@ -0,0 +1,20 @@
+// Copyright 2010 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.apache.tapestry5.integration.app1.pages;
+
+public class NoTypeProvidedDemo
+{
+
+}
Propchange:
tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/NoTypeProvidedDemo.java
------------------------------------------------------------------------------
svn:eol-style = native