--java private List<Map<String, String>> parentList = new ArrayList<Map<String, String>>(); HashMap<String, String> map; for (int i = 0; i < objectList.size(); i++) { JSONObject categoryInfo = objectList.getJSONObject(i); map = new HashMap<String, String>(); map.put("id", categoryInfo.getString("categoryId")); map.put("name", categoryInfo.getString("categoryName")); categoryMapList.add(map); } --jsp <s:select name="parentId" id="parentId" list="parentList" cssClass="DropDownList" listKey="%{id}" listValue="%{name}" headerKey="" headerValue="%{getText('common.dropdown.select')}" value="%{parentId}" required="true" />
'Struts2' 카테고리의 다른 글
필수항목에 *를 붙이기 (0) | 2010.10.14 |
---|---|
다중전송방지 (0) | 2010.10.14 |
Struts2에서 예외처리 (0) | 2010.08.26 |
struts.properties , 사용방법 (0) | 2010.08.16 |
현재 URL 가져오기 (0) | 2010.08.14 |