diff options
author | Artur Signell <artur@vaadin.com> | 2014-12-12 23:29:41 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-12-15 09:41:24 +0000 |
commit | ad8ce56c124440e24b0c40139f7159a6a63a3341 (patch) | |
tree | 1d22525fdd16e55aa23fd54b99079dd829e63c15 /server/src/com | |
parent | 3f7c75415bc73ab750f809bde0c5da02f5d8e7c2 (diff) | |
download | vaadin-framework-ad8ce56c124440e24b0c40139f7159a6a63a3341.tar.gz vaadin-framework-ad8ce56c124440e24b0c40139f7159a6a63a3341.zip |
Make field binding in designs case insensitive (#7749)
Change-Id: I002daf9c2cf544bd648ad9b009c67e058f514aad
Diffstat (limited to 'server/src/com')
-rw-r--r-- | server/src/com/vaadin/ui/declarative/FieldBinder.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/declarative/FieldBinder.java b/server/src/com/vaadin/ui/declarative/FieldBinder.java index ab71589db2..f456b2e29a 100644 --- a/server/src/com/vaadin/ui/declarative/FieldBinder.java +++ b/server/src/com/vaadin/ui/declarative/FieldBinder.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.logging.Logger; @@ -93,7 +94,8 @@ public class FieldBinder implements Serializable { private void resolveFields() { for (Field memberField : getFieldsInDeclareOrder(bindTarget.getClass())) { if (Component.class.isAssignableFrom(memberField.getType())) { - fieldMap.put(memberField.getName(), memberField); + fieldMap.put(memberField.getName().toLowerCase(Locale.ENGLISH), + memberField); } } } @@ -170,7 +172,7 @@ public class FieldBinder implements Serializable { return false; } // validate that the field can be found - Field field = fieldMap.get(fieldName); + Field field = fieldMap.get(fieldName.toLowerCase(Locale.ENGLISH)); if (field == null) { getLogger().fine( "No field was found by identifier " + identifier); |