Permalink
Browse files

[#493] make sure we use correct field name for errors in Map and List…

… binding
  • Loading branch information...
1 parent a2e96ef commit 94acc010a10e5ed5fda5bb7fb05773f4e7829869 @alisonatwork committed Mar 9, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 framework/src/play/data/binding/Binder.java
@@ -154,8 +154,8 @@ static Object bindInternal(String name, Class clazz, Type type, Annotation[] ann
r.put(oKey, oValue);
} else {
tP = new HashMap<String, String[]>();
- tP.put("value", params.get(name + suffix + "[" + key + "]"));
- Object oValue = bindInternal("value", valueClass, valueClass, annotations, tP, "", value);
+ tP.put(name + suffix + "[" + key + "]", params.get(name + suffix + "[" + key + "]"));
+ Object oValue = bindInternal(name + suffix + "[" + key + "]", valueClass, valueClass, annotations, tP, "", value);
if (oValue != MISSING) {
r.put(oKey, oValue);
} else {
@@ -220,8 +220,8 @@ static Object bindInternal(String name, Class clazz, Type type, Annotation[] ann
((List) r).set(key, oValue);
} else {
Map<String, String[]> tP = new HashMap<String, String[]>();
- tP.put("value", params.get(name + suffix + "[" + key + "]"));
- Object oValue = bindInternal("value", componentClass, componentClass, annotations, tP, "", value);
+ tP.put(name + suffix + "[" + key + "]", params.get(name + suffix + "[" + key + "]"));
+ Object oValue = bindInternal(name + suffix + "[" + key + "]", componentClass, componentClass, annotations, tP, "", value);
if (oValue != MISSING) {
((List) r).set(key, oValue);
}

0 comments on commit 94acc01

Please sign in to comment.