我想把一串列表的数据的一个字段放到jsp中下拉菜单里面,但是不知道怎么弄,这是部分代码
@RequestMapping(value = "/typelist")
public String typelist(Model model) {
List<String> dictlist = dictService.findAllType();
model.addAttribute("typelist", dictlist);
return PATH_TYPELIST;
}
@RequestMapping(value = "/typelisttest")
@ResponseBody
public Object typelisttest(Model model) {
List<String> dictlist = dictService.findAllType();
return dictlist;
}
@RequestMapping(value = "typealltest")
@ResponseBody
public Object typealltest(Model model, HttpServletRequest request) {
Map<String, Object> searchParams = Maps.newHashMap();
//searchParams.put("EQ_type", "工作年限");
List<Dict> dictlist = dictService.findAll(searchParams,"","");
System.out.println("\n============"+new DictController()+"\n");
return dictlist;
}
jsp代码是
<select class="combox class" name="bizhong" selectedValue="XX" dataUrl="XX"> 里面dataurl写什么
JSP spring
------解决方案--------------------
直接放到list里面,for遍历把option循环出来吧