tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andy...@apache.org
Subject svn commit: r593160 - in /tapestry/tapestry4/trunk/tapestry-contrib/src: java/org/apache/tapestry/contrib/table/model/simple/ test/org/apache/tapestry/contrib/table/ test/org/apache/tapestry/contrib/table/model/ test/org/apache/tapestry/contrib/table/m...
Date Thu, 08 Nov 2007 14:12:55 GMT
Author: andyhot
Date: Thu Nov  8 06:12:54 2007
New Revision: 593160

URL: http://svn.apache.org/viewvc?rev=593160&view=rev
Log:
TAPESTRY-1872: use java 1.4 method + add small test for the column and display name transformations

Added:
    tapestry/tapestry4/trunk/tapestry-contrib/src/test/org/apache/tapestry/contrib/table/
    tapestry/tapestry4/trunk/tapestry-contrib/src/test/org/apache/tapestry/contrib/table/model/
    tapestry/tapestry4/trunk/tapestry-contrib/src/test/org/apache/tapestry/contrib/table/model/simple/
    tapestry/tapestry4/trunk/tapestry-contrib/src/test/org/apache/tapestry/contrib/table/model/simple/TestSimpleTableColumn.java
Modified:
    tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/model/simple/SimpleTableColumn.java

Modified: tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/model/simple/SimpleTableColumn.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/model/simple/SimpleTableColumn.java?rev=593160&r1=593159&r2=593160&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/model/simple/SimpleTableColumn.java
(original)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/java/org/apache/tapestry/contrib/table/model/simple/SimpleTableColumn.java
Thu Nov  8 06:12:54 2007
@@ -158,7 +158,7 @@
     public void setDisplayName(String displayName)
     {
         if (displayName != null)
-            displayName = displayName.replace("_", ".");
+            displayName = displayName.replace('_', '.');
         
         m_strDisplayName = displayName;
     }

Added: tapestry/tapestry4/trunk/tapestry-contrib/src/test/org/apache/tapestry/contrib/table/model/simple/TestSimpleTableColumn.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-contrib/src/test/org/apache/tapestry/contrib/table/model/simple/TestSimpleTableColumn.java?rev=593160&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-contrib/src/test/org/apache/tapestry/contrib/table/model/simple/TestSimpleTableColumn.java
(added)
+++ tapestry/tapestry4/trunk/tapestry-contrib/src/test/org/apache/tapestry/contrib/table/model/simple/TestSimpleTableColumn.java
Thu Nov  8 06:12:54 2007
@@ -0,0 +1,16 @@
+package org.apache.tapestry.contrib.table.model.simple;
+
+import org.apache.tapestry.TestBase;
+import org.testng.annotations.Test;
+
+@Test
+public class TestSimpleTableColumn extends TestBase
+{
+    public void test_display_column_names()
+    {
+        SimpleTableColumn column = new SimpleTableColumn("a.b_c");
+        assertEquals(column.getDisplayName(), "a.b.c");
+        assertEquals(column.getColumnName(), "a_b_c");
+
+    }
+}



Mime
View raw message