rolemenutree.jsp
来自「管理公司合同」· JSP 代码 · 共 74 行
JSP
74 行
<%@page language="java" contentType="text/html; charset=GBK"%>
<%@taglib uri="/WEB-INF/tag.tld" prefix="tag"%>
<%@ page import="cn.com.juneng.system.common.taglib.tree.impl.SysMenuTreeService" %>
<html>
<head>
<title>系统菜单授权</title>
<link href="<%=request.getContextPath()%>/css/commonPage.css" rel="stylesheet" type="text/css">
<style>
<!--
a:link {
text-decoration:none;
}
a:hover {
text-decoration:none;
}
a:visited {
text-decoration:none;
}
a:active {
text-decoration:none;
}
a:visited:hover {
text-decoration:none;
}
-->
</style>
</head>
<body style="padding:0 0 0 0; margin:0 0 0 0">
<%
//已经授权的菜单
String menuIds = (String)request.getAttribute("MenuIds");
%>
<table >
<tr>
<td class="tHeading"><div align='center'><b>角色[<tag:attr source="VO" attr="roleName" />].授权菜单</b></div></td>
</tr>
</table>
<table width='100%' height='90%'>
<tr bgcolor='#F0FBFF'>
<td style="vertical-align:top" width='300'>
<div align="left">
<tag:tree treeName="系统菜单" treeService="<%=new SysMenuTreeService() %>" checkedId="<%=menuIds%>" selectType="checkbox" selectAll="true"/>
</div>
</td>
<td style="vertical-align:top" ><input type="button" value="保存修改" onclick='save()'></td>
</tr>
</table>
<form name="form1" action="<tag:attr source="ActionUrl" />" method="post" >
<input type="hidden" name="actionType" value="saveMenu">
<input type="hidden" name="roleId" value="<tag:attr source="VO" attr="roleId"/>">
<input type="hidden" name="menuIds" value="">
</form>
</body>
<script>
function save(){
form1.menuIds.value = getSelected();
form1.submit();
}
function getSelected(){
var nodes = atree.getSelectedChildNodes();
var retValue = "";
for (var i = 0; i < nodes.length; i++)
{
retValue += nodes[i].value+",";
}
if(retValue!=""){
retValue = retValue.substring(0,retValue.length-1);
}
return retValue;
}
</script>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?