failing nested list binding

master
Keith Donald 14 years ago
parent a417aa2ea3
commit 3536b8178d
  1. 17
      org.springframework.web.servlet/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7839Tests.java

@ -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);
}
@ -116,6 +124,11 @@ public class Spr7839Tests {
@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);
}

Loading…
Cancel
Save