Browse Source

Fix for #3554 - Form.addItemProperty() resets caption created by FieldFactory

svn changeset:11732/svn branch:6.3
tags/6.7.0.beta1
Artur Signell 14 years ago
parent
commit
5076f55235
1 changed files with 1 additions and 14 deletions
  1. 1
    14
      src/com/vaadin/ui/Form.java

+ 1
- 14
src/com/vaadin/ui/Form.java View 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);

Loading…
Cancel
Save