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

来源:互联网 发布:html5商城源码 编辑:程序博客网 时间:2024/05/21 21:26
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

原创粉丝点击