You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by jk...@apache.org on 2006/11/12 03:31:58 UTC

svn commit: r473851 - in /tapestry/tapestry4/trunk/tapestry-framework/src: java/org/apache/tapestry/components/ForBean.java js/tapestry/core.js

Author: jkuhnert
Date: Sat Nov 11 18:31:57 2006
New Revision: 473851

URL: http://svn.apache.org/viewvc?view=rev&rev=473851
Log:
Resolved TAPESTRY-1119

Modified:
    tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/components/ForBean.java
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/components/ForBean.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/components/ForBean.java?view=diff&rev=473851&r1=473850&r2=473851
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/components/ForBean.java (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/components/ForBean.java Sat Nov 11 18:31:57 2006
@@ -393,17 +393,23 @@
     protected String getStringRepFromValue(Object value)
     {
         String rep;
+        
         DataSqueezer squeezer = getDataSqueezer();
-
+        
         // try to extract the primary key from the value
+        
         Object pk = getPrimaryKeyFromValue(value);
-        if (pk != null)
+        
+        if (pk != null) {
+            
             // Primary key was extracted successfully.
             rep = DESC_PRIMARY_KEY + squeezer.squeeze(pk);
-        else
+        } else {
+            
             // primary key could not be extracted. squeeze value.
             rep = DESC_VALUE + squeezer.squeeze(value);
-
+        }
+        
         return rep;
     }
 
@@ -419,8 +425,9 @@
     {
         if (value == null)
             return null;
-
+        
         Object primaryKey = getKeyExpressionFromValue(value);
+        
         if (primaryKey == null)
             primaryKey = getConverterFromValue(value);
 
@@ -460,6 +467,7 @@
             return null;
 
         Object primaryKey = converter.getPrimaryKey(value);
+        
         return primaryKey;
     }
 
@@ -492,12 +500,14 @@
                     repToValueMap,
                     rep,
                     _completeRepSource);
+            
             if (value != null)
                 return value;
         }
 
         // Matching of the string representation was not successful or was disabled.
         // Use the standard approaches to obtain the value from the rep.
+        
         char desc = rep.charAt(0);
         String squeezed = rep.substring(1);
         switch (desc)

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js?view=diff&rev=473851&r1=473850&r2=473851
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js Sat Nov 11 18:31:57 2006
@@ -271,10 +271,7 @@
 	        }
 	    }
 		
-	    var e = document.createElement("script");
-	    e.src = url;
-	    e.type = "text/javascript";
-	    document.getElementsByTagName("head")[0].appendChild(e);
+	    dojo.hostenv.loadUri(url);
 	},
 	
 	/**