-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
599 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<%@ page language="java" pageEncoding="UTF-8"%> | ||
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%> | ||
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%> | ||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> | ||
<html> | ||
<head> | ||
<title>权限管理</title> | ||
<style type="text/css"> | ||
</style> | ||
</head> | ||
<body> | ||
<html:form action="actionList.do"> | ||
<html:hidden property="deleteIds" /> | ||
<h1> | ||
权限列表 | ||
</h1> | ||
<ul> | ||
<li> | ||
权限名称 | ||
<html:text property="nameQry" /> | ||
</li> | ||
<li> | ||
权限路径 | ||
<html:text property="urlQry" /> | ||
</li> | ||
</ul> | ||
<html:submit property="query" value="查询" /> | ||
<html:submit property="del" value="批量删除" style="display:none" /> | ||
<input type="button" value="新增" | ||
onclick="window.location.href='actionModify.do'" /> | ||
<table border="1" width="80%"> | ||
<thead> | ||
<tr> | ||
<th> | ||
权限名称 | ||
</th> | ||
<th> | ||
权限路径 | ||
</th> | ||
<th width="8%"> | ||
编辑 | ||
</th> | ||
<th width="8%"> | ||
删除 | ||
</th> | ||
</tr> | ||
</thead> | ||
<c:if test="${not empty actionList}"> | ||
<c:forEach items="${actionList}" var="action"> | ||
<tr> | ||
<td> | ||
<c:out value="${action.name }" /> | ||
</td> | ||
<td> | ||
<c:out value="${action.url }" /> | ||
</td> | ||
<td align="center"> | ||
<a href="actionModify.do?id=${action.id }">编辑</a> | ||
</td> | ||
<td align="center"> | ||
<a | ||
href="javascript:if(confirm('是否确定删除这条记录?')){document.forms[0].deleteIds.value='${action.id}';document.forms[0].del.click();}">删除</a> | ||
</td> | ||
</tr> | ||
</c:forEach> | ||
</c:if> | ||
</table> | ||
</html:form> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<%@ page language="java" pageEncoding="UTF-8"%> | ||
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%> | ||
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%> | ||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> | ||
<html> | ||
<head> | ||
<title>权限维护</title> | ||
<style type="text/css"> | ||
</style> | ||
<script type="text/javascript" src="extjs/ext-all.js"></script> | ||
<script type="text/javascript" src="js/common.js"></script> | ||
<script type="text/javascript"> | ||
function checkActionModify(){ | ||
with(document.forms[0]){ | ||
if(isBlank(name.value)){ | ||
alert('权限名称必须填写!'); | ||
return false; | ||
} | ||
if(isBlank(url.value)){ | ||
alert('权限路径必须填写!'); | ||
return false; | ||
} | ||
} | ||
document.getElementById('submit').click(); | ||
return true; | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<html:form action="actionModify.do"> | ||
<h1>权限维护</h1> | ||
<input type="button" value="返回" onclick="history.go(-1);" /> | ||
<html:submit property="submit" value="保存" onclick="return checkActionModify();"/> | ||
<html:hidden property="id"/> | ||
<ul> | ||
<li> | ||
权限名称<span style="color:red" title="必填">(*)</span> | ||
<html:text property="name"/> | ||
</li> | ||
<li> | ||
权限路径<span style="color:red" title="必填">(*)</span> | ||
<html:text property="url" /> | ||
</li> | ||
</ul> | ||
</html:form> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Generated by MyEclipse Struts | ||
* Template path: templates/java/JavaClass.vtl | ||
*/ | ||
package com.rbac.action.system; | ||
|
||
import java.util.List; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
|
||
import org.apache.struts.action.ActionForm; | ||
import org.apache.struts.action.ActionForward; | ||
import org.apache.struts.action.ActionMapping; | ||
|
||
import com.rbac.common.BaseAction; | ||
import com.rbac.form.system.ActionListForm; | ||
import com.rbac.service.ActionService; | ||
import com.rbac.util.CommonUtils; | ||
|
||
/** | ||
* MyEclipse Struts | ||
* Creation date: 04-30-2014 | ||
* | ||
* XDoclet definition: | ||
* @struts.action path="/actionList" name="actionListForm" input="/system/actionList.jsp" scope="request" validate="true" | ||
*/ | ||
public class ActionListAction extends BaseAction { | ||
|
||
/** | ||
* Method execute | ||
* @param mapping | ||
* @param form | ||
* @param request | ||
* @param response | ||
* @return ActionForward | ||
*/ | ||
public ActionForward execute(ActionMapping mapping, ActionForm form, | ||
HttpServletRequest request, HttpServletResponse response) { | ||
ActionListForm actionListForm = (ActionListForm) form; | ||
ActionService actionService = (ActionService) super | ||
.getBean("actionService"); | ||
if (CommonUtils.isNotBlank(actionListForm.getDel())) { | ||
actionService.deleteAction(Long.parseLong(actionListForm | ||
.getDeleteIds()), super.getCurrentAccountId(request)); | ||
} | ||
List actionList = actionService.getSysActionList(actionListForm | ||
.getNameQry(), actionListForm.getUrlQry()); | ||
request.setAttribute("actionList", actionList); | ||
return mapping.getInputForward(); | ||
} | ||
} |
Oops, something went wrong.