tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject svn commit: r903136 - in /tapestry/tapestry5/branches/5.0/tapestry-core/src/test: app1/ java/org/apache/tapestry5/integration/ java/org/apache/tapestry5/integration/app1/pages/ resources/org/apache/tapestry5/integration/app1/pages/
Date Tue, 26 Jan 2010 09:21:53 GMT
Author: uli
Date: Tue Jan 26 09:21:53 2010
New Revision: 903136

URL: http://svn.apache.org/viewvc?rev=903136&view=rev
Log:
TAP5-991: BeanDisplay doesn't use Messages for displaying enum properties - make sure it really
does.

Added:
    tapestry/tapestry5/branches/5.0/tapestry-core/src/test/app1/BeanDisplayEnumDemo.tml
    tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/BeanDisplayEnumDemo.java
    tapestry/tapestry5/branches/5.0/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/BeanDisplayEnumDemo.properties
Modified:
    tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
    tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java

Added: tapestry/tapestry5/branches/5.0/tapestry-core/src/test/app1/BeanDisplayEnumDemo.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.0/tapestry-core/src/test/app1/BeanDisplayEnumDemo.tml?rev=903136&view=auto
==============================================================================
--- tapestry/tapestry5/branches/5.0/tapestry-core/src/test/app1/BeanDisplayEnumDemo.tml (added)
+++ tapestry/tapestry5/branches/5.0/tapestry-core/src/test/app1/BeanDisplayEnumDemo.tml Tue
Jan 26 09:21:53 2010
@@ -0,0 +1,7 @@
+<html t:type="Border" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
+    
+    <h1>BeanDisplay Enum Demo</h1>
+    
+    <t:beandisplay object="prop:object" />
+
+</html>

Modified: tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java?rev=903136&r1=903135&r2=903136&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
(original)
+++ tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
Tue Jan 26 09:21:53 2010
@@ -2526,4 +2526,12 @@
         clickAndWait("link=Available File");
         assertTextPresent("This file should be available to clients.");
     }
+    
+    /** TAP5-991 */
+    public void bean_display_enum_value_from_messages()
+    {
+        start("BeanDisplay Enum Demo");
+        
+        assertText("//dd[2]", "Ultra Important");
+    }
 }

Added: tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/BeanDisplayEnumDemo.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/BeanDisplayEnumDemo.java?rev=903136&view=auto
==============================================================================
--- tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/BeanDisplayEnumDemo.java
(added)
+++ tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/BeanDisplayEnumDemo.java
Tue Jan 26 09:21:53 2010
@@ -0,0 +1,36 @@
+// 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;
+
+import org.apache.tapestry5.integration.app1.data.ToDoItem;
+import org.apache.tapestry5.integration.app1.data.Urgency;
+
+/**
+ * Used to demonstrate the built-in support for enum types.
+ */
+public class BeanDisplayEnumDemo
+{
+    public ToDoItem getObject()
+    {
+        ToDoItem item = new ToDoItem();
+        
+        item.setId(1);
+        item.setOrder(1);
+        item.setTitle("Develop Faster-Than-Light Travel");
+        item.setUrgency(Urgency.HIGH);
+        
+        return item;
+    }
+}

Modified: tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java?rev=903136&r1=903135&r2=903136&view=diff
==============================================================================
--- tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
(original)
+++ tapestry/tapestry5/branches/5.0/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
Tue Jan 26 09:21:53 2010
@@ -316,7 +316,10 @@
             new Item("FormFieldOutsideForm", "Form Field Outside Form",
                      "Nice exception message for common problem of form fields outside forms"),
 
-            new Item("AssetProtectionDemo", "Asset Protection Demo", "AssetProtectionDispatcher
is properly contributed and functioning")
+            new Item("AssetProtectionDemo", "Asset Protection Demo", "AssetProtectionDispatcher
is properly contributed and functioning"),
+            
+            new Item("BeanDisplayEnumDemo", "BeanDisplay Enum Demo",
+                     "User represenation of enum values is correctly read from messages")
 
     );
 

Added: tapestry/tapestry5/branches/5.0/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/BeanDisplayEnumDemo.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.0/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/BeanDisplayEnumDemo.properties?rev=903136&view=auto
==============================================================================
--- tapestry/tapestry5/branches/5.0/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/BeanDisplayEnumDemo.properties
(added)
+++ tapestry/tapestry5/branches/5.0/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/BeanDisplayEnumDemo.properties
Tue Jan 26 09:21:53 2010
@@ -0,0 +1,15 @@
+# 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.
+
+high=Ultra Important



Mime
View raw message