]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #3554 - Form.addItemProperty() resets caption created by FieldFactory
authorArtur Signell <artur.signell@itmill.com>
Tue, 9 Mar 2010 17:01:52 +0000 (17:01 +0000)
committerArtur Signell <artur.signell@itmill.com>
Tue, 9 Mar 2010 17:01:52 +0000 (17:01 +0000)
svn changeset:11732/svn branch:6.3

src/com/vaadin/ui/Form.java

index 678c323dc3d0dc04c203de0fd21adc7a20842d35..4f417c4b945c828874b929dc2a055a66fd954d79 100644 (file)
@@ -464,20 +464,7 @@ public class Form extends AbstractField implements Item.Editor, Buffered, Item,
         }
 
         // Configures the field
-        try {
-            field.setPropertyDataSource(property);
-            String caption = id.toString();
-            if (caption.length() > 50) {
-                caption = caption.substring(0, 47) + "...";
-            }
-            if (caption.length() > 0) {
-                caption = "" + Character.toUpperCase(caption.charAt(0))
-                        + caption.substring(1, caption.length());
-            }
-            field.setCaption(caption);
-        } catch (final Throwable ignored) {
-            return false;
-        }
+        field.setPropertyDataSource(property);
 
         // Register and attach the created field
         addField(id, field);