⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 roles.jsp

📁 struts+hibernate开发的一个系统
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="java.util.*"%>
<%@ page import="org.appfuse.model.*"%>
<%@ page import="org.appfuse.webapp.form.*"%>
<%@ page import="org.appfuse.util.*"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<SCRIPT language=JavaScript src="<%=request.getContextPath()%>/include/check.js" type="text/javascript"></SCRIPT>
<html>
  <head>
  <link rel=stylesheet href="<%=request.getContextPath()%>/include/style.css">
  <title>角色管理</title>
  <SCRIPT language="javascript">
     function searchRole()
     {
	document.roleForm.action="<%=request.getContextPath()%>/roleAction.do?method=search";
        document.roleForm.submit();
     }
     function createRole()
     {
	document.roleForm.action="<%=request.getContextPath()%>/sysmanage/rolemanage/role_create.jsp";
        document.roleForm.submit();
     }
  </SCRIPT>
  </head>
<%
   List roles = (List)request.getAttribute("roles");
%>

<body>
<form name="roleForm" method="POST" >
<table border="1px" cellspacing="0" cellpadding="10" align=center width="80%" bgColor=#E4E8EF>
  <tr>
    <td width="70%">角色编号
        <input name="roleid" type="text" size="15">
 	  <a href="#"  onClick="searchRole();">查询</a>
    </td>
    <td width="30%">
        <div align="center">
 	  <a href="#"  onClick="createRole();">创建新角色</a>
        </div>
    </td>
  </tr>
</table>
<!--
<table border="1px" cellspacing="0" cellpadding="10" align=center width="80%" bgColor=#E4E8EF>
  <tr>
    <td align="left" width="70%">角色列表</td>
    <td align="right" width="30%">
 	  <input type="button" name="create" value="创建新角色" onClick="createStaff();">
    </td>
  </tr>
</table>
-->
<table border="1px" cellspacing="0" cellpadding="10" align=center width="80%" bgColor=#E4E8EF>
  <tr bgcolor="#76aef0">
    <th width="10%"><div align="center">角色编号</div></th>
    <th width="30%"><div align="center">角色名称</div></th>
    <th width="30%"><div align="center">角色描述</div></th>
    <th width="30%"><div align="center">操作</div></th>
  </tr>
  <%
  if(roles != null)
  {
     for(int i = 0; i< roles.size(); i++)
     {
        Role role = (Role)roles.get(i);
  %>
  <tr>
    <td><%=StringUtil.getString(role.getRoleid())%></td>
    <td>
<a href="<%=request.getContextPath()%>/staffRoleAction.do?method=rolestaff&roleid=<%=role.getRoleid()%>"><%=role.getRolename()%></a>
        </td>
    <td><%=role.getDescription()%></td>
    <td align="center">
<a href="<%=request.getContextPath()%>/roleAction.do?method=update&roleid=<%=role.getRoleid()%>">编辑</a>
<a href="<%=request.getContextPath()%>/roleAction.do?method=delete&roleid=<%=role.getRoleid()%>">删除</a>
<a href="<%=request.getContextPath()%>/roleAuthAction.do?method=roleauth&roleid=<%=role.getRoleid()%>">分配权限</a>
    </td>
  </tr>
  <%
      }
   }
  %>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -