이 누리집은 대한민국 공식 전자정부 누리집입니다.
정*선
2011-06-17 17:27:32
2,614
실행환경
완료
map 으로 파라메타를 받으려구 합니다.
특별한 이유가 없는듯한데..오류두 없구요.. 값이 안 넘어오네요...ㅠㅠ
혹시 다른 어떤 설정이 필요한것인지요?
@RequestMapping(value="/test/departmentList.do")
public String departmentList(Map<String, String> commandMap, ModelMap model)
throws Exception {
System.out.println("my test");
Iterator it = commandMap.keySet().iterator();
while (it.hasNext()) {
String key = (String) it.next();
System.out.print("key="+key);
System.out.println(" value="+commandMap.get(key));
}
List<DepartmentVO> departmentList = departmentService.getDepartmentList(commandMap);
model.addAttribute("departmentList", departmentList);
return "/test/departmentList";
}
안녕하세요.. 정영선님..
다음과 같은.. CommandMapArgumentResolver 설정이 필요합니다.
web layer 부분에 설정에 추가하시면 됩니다. (ViewResolver 설정이 있는 위치)
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
<property name="customArgumentResolvers">
<list>
<bean class="egovframework.rte.ptl.mvc.bind.CommandMapArgumentResolver"/>
</list>
</property>
</bean>
그럼.. 즐거운 하루되십시오.
감사합니다.