您的位置:首页 > 编程语言 > Java开发

解决struts2 <s:doubleselect>二级菜单没有值

2012-01-10 10:16 483 查看

private List<Agency> departList = new ArrayList<Agency>(); //部门列表

private Map<Integer, List<Agency>> officeMap = new HashMap<Integer, List<Agency>>(); //科室列表,map的键值对应部门id

<s:form action="userInfoAdd?operate=doAddUserInfo" method="post" name="form1" theme="simple" id="formadd">

<s:doubleselect list="departList" listKey="aId" listValue="aName" formName="form1" name="depart"

doubleName="office" doubleList="officeMap.get(aId)" doubleListKey="aId" doubleListValue="aName" theme="simple"/>

</s:form>

注意的点是:1.form一定要有name,id;2.doubleList="officeMap.get(aId),aId对应listKey
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: