<!-- 下拉菜单(List(Map)) -->
<%
Map list_map = new HashMap();
list_map.put("cityid","1");
list_map.put("cityname","北京");
list_map.put("2","首都");
Map list_map2 = new HashMap();
list_map2.put("cityid","2");
list_map2.put("cityname","上海");
list_map2.put("2","直辖市");
Map list_map3 = new HashMap();
list_map3.put("cityid","3");
list_map3.put("cityname","福州");
list_map3.put("2","省会城市");
List cityList3 = new ArrayList();
cityList3.add(list_map);
cityList3.add(list_map2);
cityList3.add(list_map3);
request.setAttribute("cityList3",cityList3);
%>
<s:select
list="#request.cityList3"
name="city3"
label="List<Map>"
listKey="cityid"
listValue="cityname"
headerKey="-1"
headerValue="==请选择=="
/>
<%
Map list_map = new HashMap();
list_map.put("cityid","1");
list_map.put("cityname","北京");
list_map.put("2","首都");
Map list_map2 = new HashMap();
list_map2.put("cityid","2");
list_map2.put("cityname","上海");
list_map2.put("2","直辖市");
Map list_map3 = new HashMap();
list_map3.put("cityid","3");
list_map3.put("cityname","福州");
list_map3.put("2","省会城市");
List cityList3 = new ArrayList();
cityList3.add(list_map);
cityList3.add(list_map2);
cityList3.add(list_map3);
request.setAttribute("cityList3",cityList3);
%>
<s:select
list="#request.cityList3"
name="city3"
label="List<Map>"
listKey="cityid"
listValue="cityname"
headerKey="-1"
headerValue="==请选择=="
/>