failing nested list binding
This commit is contained in:
@@ -70,15 +70,23 @@ public class Spr7839Tests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void listOfListsElement() throws Exception {
|
||||
@Ignore
|
||||
public void listOfLists() throws Exception {
|
||||
request.setRequestURI("/nested/listOfLists");
|
||||
request.addParameter("nested.listOfLists[0]", "Nested1,Nested2");
|
||||
adapter.handle(request, response, controller);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void listOfListsElement() throws Exception {
|
||||
request.setRequestURI("/nested/listOfListsElement");
|
||||
request.addParameter("nested.listOfLists[0][0]", "Nested");
|
||||
adapter.handle(request, response, controller);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void listOfListsElementAutogrowObject() throws Exception {
|
||||
request.setRequestURI("/nested/listOfLists");
|
||||
request.setRequestURI("/nested/listOfListsElement");
|
||||
request.addParameter("nested.listOfLists[0][0].foo", "Nested");
|
||||
adapter.handle(request, response, controller);
|
||||
}
|
||||
@@ -113,9 +121,14 @@ public class Spr7839Tests {
|
||||
public void handlerListElement(JavaBean bean) {
|
||||
assertEquals("Nested", bean.nested.list.get(0).foo);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/nested/listOfLists")
|
||||
public void handlerListOfLists(JavaBean bean) {
|
||||
assertEquals("Nested2", bean.nested.listOfLists.get(0).get(1).foo);
|
||||
}
|
||||
|
||||
@RequestMapping("/nested/listOfListsElement")
|
||||
public void handlerListOfListsElement(JavaBean bean) {
|
||||
assertEquals("Nested", bean.nested.listOfLists.get(0).get(0).foo);
|
||||
}
|
||||
|
||||
@@ -143,7 +156,7 @@ public class Spr7839Tests {
|
||||
private List<NestedBean> list;
|
||||
|
||||
private List<List<NestedBean>> listOfLists;
|
||||
|
||||
|
||||
private Map<String, NestedBean> map = new HashMap<String, NestedBean>();
|
||||
|
||||
public NestedBean() {
|
||||
|
||||
Reference in New Issue
Block a user