数据权限的控制 SSH,jdk7 阶段性总结. --两个select来回移动

1.
数据权限的控制 SSH,jdk7 阶段性总结. --两个select来回移动_第1张图片
2.
数据权限的控制 SSH,jdk7 阶段性总结. --两个select来回移动_第2张图片

3.
数据权限的控制 SSH,jdk7 阶段性总结. --两个select来回移动_第3张图片

佳静,不可变小啊. 提前变小// 使用美女图片很棒.额呵呵~

二次Rev 贴上去.
//================
页面效果




1.主要Action: ResDataAction  ,SimpleHelpAction
2.页面部分.
userList.jsp  开始页面 ,点击帮助,进入 选择权限可.
resData下的三个主要页面.
resdataDetail.jsp
resDataList.jsp  左边显示全部的信息.  Ok.
simpleHelp.jsp
3.struts.xml
struts-adminx.xml

/=================
可扩展部分:
加上复选框,参见 examAction. 考试章节管理. 谢国芹的.


ResDataAction 数据权限的action

package com.myland.jp.adminx.resdata.action;

import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.myland.framework.base.BaseAction;
import com.myland.framework.init.BaseConf;
import com.myland.framework.sequence.SeqUtil;
import com.myland.framework.util.Constants;
import com.myland.jp.common.service.ResDataService;
import com.myland.pojo.ResData;

/**
 * 数据权限操作action
 * 
 * @author chenem
 * @email [email protected]
 * @create 2014年10月13日 下午8:02:07
 */
public class ResDataAction extends BaseAction {

    private static final long serialVersionUID = 5188450563333761481L;

    private static final Logger log = LogManager.getLogger(ResDataAction.class);

    private ResDataService resDataService;

    private String userId; // 用户id

    private String resKey;

    /**
     * 数据权限对象
     */
    private ResData resDataBean; // 对象

    // 传过来 就id, resData.

    private String rdNames;

    private List cfgResDataLst; // 数据权限的option显示用的.

    private String id; // ? 我不用.

    private String resData;

    /**
     * 反馈信息. 成功
     */
    private String msg; //

    /**
     * 默认方法
     */
    public String execute() throws Exception {
        return SUCCESS;
    }

    /**
     * 打开数据权限操作页面
     * 
     * @author chenem
     * @create 2014年10月13日 下午8:06:01
     * @return
     */
    public String resDataOpen() {
        cfgResDataLst = BaseConf.get().getList(BaseConf.RES_DATA); // [AGENT_DATA:代理商] 获取的 键值, XPath.

        if (StringUtils.isBlank(StringUtils.trim(resKey))) {  // 初,key空,得1可.
            // get()获取配置,getList .get(0 ) agent | 得到key可.
            resKey = ((String) BaseConf.get().getList(BaseConf.RES_DATA).get(0)).split(":")[0];
        }
        
        resDataBean = resDataService.getResDataByUserId(userId, resKey); // userId,402,null 有时候为null,
        // resData带有,的就是显示后面驾校的内容. 几个,,的.
        rdNames = resDataService.getRdNamesByRd_comma(resDataBean); //
        return "open";
    }

    /**
     * 保存数据权限
     * 
     * @author lengzl
     * @create 2014年12月6日 下午5:08:35
     * @return
     */
    public String save() {
        resDataBean = new ResData();
        //新加
        if(StringUtils.isBlank(StringUtils.trim(id))){
            if(StringUtils.isNotBlank(StringUtils.trim(resData))){
                resDataBean.setId(SeqUtil.getNextKeyDefaultDsContext(Constants.TSeq.T_RES_DATA));
                resDataBean.setResData(resData);
                resDataBean.setResKey(resKey);
                resDataBean.setUserId(Long.valueOf(userId));
                resDataService.addResData(resDataBean);
                msg = "新增成功!";
            }
        }else{
            if(StringUtils.isBlank(StringUtils.trim(resData))){
                resDataService.delResData(Long.valueOf(id));
                msg = "修改成功!";
            }else{
                resDataBean.setId(Long.valueOf(id));
                resDataBean.setResData(resData);
                resDataService.updateResData(resDataBean);
                msg = "修改成功!";
            }
        }
        return resDataOpen();
    }

    public void setResDataService(ResDataService resDataService) {
        this.resDataService = resDataService;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getResKey() {
        return resKey;
    }

    public void setResKey(String resKey) {
        this.resKey = resKey;
    }

    public String getRdNames() {
        return rdNames;
    }

    public void setRdNames(String rdNames) {
        this.rdNames = rdNames;
    }

    public List getCfgResDataLst() {
        return cfgResDataLst;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public ResData getResDataBean() {
        return resDataBean;
    }

    public void setResDataBean(ResData resDataBean) {
        this.resDataBean = resDataBean;
    }

    public String getResData() {
        return resData;
    }

    public void setResData(String resData) {
        this.resData = resData;
    }

    public String getMsg() {
        return msg;
    }
    
    public void setMsg(String msg) {
        this.msg = msg;
    }

}


SimpleHelpAction  帮助页面的action

package com.myland.jp.adminx.resdata.action;

import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.myland.framework.base.BaseAction;
import com.myland.framework.init.BaseConf;
import com.myland.framework.mybatis.query.Condition;
import com.myland.framework.mybatis.query.CxxString;
import com.myland.framework.mybatis.query.DefaultQueryRulesCreator;
import com.myland.framework.mybatis.query.QueryCriterion;
import com.myland.framework.util.ExceptionPrintUtil;
import com.myland.jp.common.service.ResDataService;
import com.myland.pojo.ResData;
import com.myland.pojo.User;

/**
 * 报名管理???通用帮助
 * 
 * 
 * 作者:WuM
 * 日期:2012-12-8
 * 
 */

public class SimpleHelpAction extends BaseAction {

    private static final long serialVersionUID = -6809838912828224054L;

    private static final Logger log = LogManager.getLogger(SimpleHelpAction.class);

    private ResDataService resDataService;

    private String userId;

    /**
     * 搜索的名字,如 agent的名字.
     */
    private String sechName;

    private String idAndName;

    private String resKeyValue;

    private String selectIdAndNames;

    private String info;

    private String resKey; // 下拉框的值 **) 将原页面的 c 同意换成resKey ★)

    private List> resDataList;

    private QueryCriterion qc;

    private String bar;

    /**
     * 通用帮助
     * 
     * @return
     * @throws Exception
     */
    public String simpleHelp() throws Exception {

        User curuser = (User) getRequest().getSession().getAttribute("curuser");
        if (curuser == null) {
            getRequest().setAttribute("err", "session信息丢失!");
            getRequest().setAttribute("rtnurl", BaseConf.get().getString(BaseConf._ADMINX_NAMED_RESOURCES_LOGIN));
            return ERROR;
        }

        ResData rd = resDataService.getResDataByUserId(userId, resKey); //ResData对象.

        if(rd != null){
            info = resDataService.getRdNamesByRd(rd);  //, |的格式.
        }
        
        return SUCCESS;
    }

    /**
     * 查询data
     * 查询全部的List //要确保,可以查agent... ★)
     * @author lengzl
     * @create 2014年12月6日 下午12:22:42
     * @return
     */
    public String resDataSearch() {
        
        if(StringUtils.isNotBlank(StringUtils.trim(sechName))){
            try {
                sechName = java.net.URLDecoder.decode(sechName,"UTF-8";);
            } catch(UnsupportedEncodingException e) {
                log.error("转码出现异常!");
                ExceptionPrintUtil.PrintErrorMessage(e, log);
            }   
        }

        qc = getQueryCriterion(new DefaultQueryRulesCreator() {

            private static final long serialVersionUID = -6488407568459794160L;

            public Map createConditions() {

                Map conditions = new HashMap();
                conditions.put("resKey", new CxxString(resKey));
                if (StringUtils.isNotBlank(StringUtils.trim(sechName))) {
                    conditions.put("sechName", new CxxString(sechName));
                }

                return conditions;
            }
        });

        //分页部分
        qc.getPagination().setPageSize(3);
        resDataList = resDataService.getViewResDate(qc);
        qc.getPagination().setShowType("001"); //默认显示的.
        bar = qc.getPagination().toBar();

        return "list";
    }

    public String getSechName() {
        return sechName;
    }

    public void setSechName(String sechName) {
        this.sechName = sechName;
    }

    public String getIdAndName() {
        return idAndName;
    }

    public void setIdAndName(String idAndName) {
        this.idAndName = idAndName;
    }

    public String getResKeyValue() {
        return resKeyValue;
    }

    public void setResKeyValue(String resKeyValue) {
        this.resKeyValue = resKeyValue;
    }

    public String getSelectIdAndNames() {
        return selectIdAndNames;
    }

    public void setSelectIdAndNames(String selectIdAndNames) {
        this.selectIdAndNames = selectIdAndNames;
    }

    public QueryCriterion getQc() {
        return qc;
    }

    public void setQc(QueryCriterion qc) {
        this.qc = qc;
    }

    public String getResKey() {
        return resKey;
    }

    public void setResKey(String resKey) {
        this.resKey = resKey;
    }

    public List> getResDataList() {
        return resDataList;
    }

    public void setResDataList(List> resDataList) {
        this.resDataList = resDataList;
    }

    public void setResDataService(ResDataService resDataService) {
        this.resDataService = resDataService;
    }

    public String getBar() {
        return bar;
    }

    public void setBar(String bar) {
        this.bar = bar;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

}



resdataDetail.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/adminx/style-traditional.css" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/adminx/basic_layout.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/adminx/common_style.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/common/jquery/jquery-1.7.2.js"></script>
<title>数据权限</title>
<script type="text/javascript">
	/*
	 保存的
	*/
	function doSave(){
		document.fm.action="${pageContext.request.contextPath}/adminx/resDataAction!save.do";
		document.fm.submit();
	}


	function doChangeKey(){
		 //jquery提交.
		document.fm.action="${pageContext.request.contextPath}/adminx/resDataAction!resDataOpen.do";
		document.fm.submit();
	}
	
	function showHelp() {
		
		var helpInfo = $("#resKey").val();  // 下拉框的值
	    
		var resData = $("#resData").val();
		
	    var userId = $("#userId").val();
			    
	    var helpUrl = "${pageContext.request.contextPath}/adminx/simpleHelp.do&resKey=" + helpInfo + "&resKeyValue=" + resData+"&userId="+userId;
	    var diaUrl = "${pageContext.request.contextPath}/common/pubHelp.jsp?url=" + helpUrl; //helpUrl就是simple.jsp的页面.
	   
        //规定一些简单 窗体的样式   接收数据父窗体.	
	    var res=showModalDialog(diaUrl,window,"dialogHeight=600px;dialogWidth=800px;status=no;");
	    alert("res的值(有,则可以获取,则可以显示.!!!):"+res); //res在 
	    if(typeof(res)!="undefined"){ //防止什么都没有选择,直接点击确定.
	    	
	    	if($.trim(res) == ''){
	    		$("#rdNames").html('');
	    		$("#resData").attr('value',null); //就是resData.
	    		return;
	    	}
	    	ress = res.split(",");	
	    
	    	var ids = "";
	    	var names = "";
	    	for(var i = 0;i<ress.length;i++){
	    		var one = ress[i].split(":");
	    		if(i!=0){ //不=0,就要先加一个,
	    			ids = ids + ",";
	    			names = names + ",";
	    		}
	    		ids = ids + one[0];
	    		names = names + one[1];
	    	}

	    	document.getElementById("resData").value=ids;  //ids 是用,的String
	    	document.getElementById("rdNames").innerText=names;
	    }
	}
	
	
	
</script>
</head>
<body>
<form name="fm" action="" method="post">
<div id="container">
	<div class="ui_content">
		<div class="ui_text_indent">
			<div id="box_border">
				<div id="box_top">查看用户权限信息</div>
				<div id="box_center" align="right">
					<a class="a1" href="#" onclick="doSave();">保存</a>
					<img src="${pageContext.request.contextPath}/adminx/images/sep.gif" align="absmiddle" />
					<a class="a1" href="${pageContext.request.contextPath}/adminx/getUsersInfo.do?conditions=keep">返回</a>
				</div>
			</div>
		</div>
	</div>
	<div class="ui_content">
		<fieldset>
			<table class="detail">
				<tr>
					<td class="label">数据权限:</td>
					<td class="data"> <!-- 后 用resData.resKey -->
						<select id="resKey" name="resKey" onChange="javascript:doChangeKey();" class="ui_input_txt04">
		                    <c:if test="${not empty cfgResDataLst}">
		                      <c:forEach items="${cfgResDataLst }" var="cfgResData">
		                        <c:set var="oneKeyArr" value="${fun:split(cfgResData, ':') }" scope="page"></c:set>  <%--拆分的方法. **lzl --%>
		                        <option value="${pageScope.oneKeyArr[0] }"  <c:if test="${resKey == pageScope.oneKeyArr[0]}">selected</c:if> >${pageScope.oneKeyArr[1] }</option>
		                      </c:forEach>
		                    </c:if>
		                </select>
						<a href="javascript:showHelp();">帮助</a>
						<span id="rdNames" style="color:red">${rdNames }</span>
						<input type="hidden" name="resData" id="resData" value="${resDataBean.resData}"/>
						<input type="hidden" name="id" id="id" value="${resDataBean.id}"/>
						<input type="hidden" name="userId" id="userId" value="${userId}"/>
					</td>
				</tr>
			</table>
		</fieldset>
	</div>
</div>
</form>
</body>
</html>


simpleHelp.jsp 弹出的帮助页面
亮点:下拉框值的获取与移动. 优于 之前廖永鹏的.

<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/adminx/style-traditional.css" />
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/webcustomer/pagination.css" /> <%-- 引入分页样式.--%>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/common/jquery/jquery-1.7.2.js"></script>
<title>数据权限</title>
<script type="text/javascript">

	var resKey ;
	/*
	页面渲染完执行
	 */
	$(document).ready( function() {
		//alert(resKey);
		resKey = '${resKey}';
		//加载左边信息resKey
		$.post("${pageContext.request.contextPath}/adminx/searchData.do?resKey="+ resKey, function(data) {
			$("#showAllData").replaceWith(data);  //左边的页面.
		});
		
		
	});

	/*
	增加选中
	 */
	function addSelect() {
		var array = getSelectedId();
		$("#AllOpts :selected").each(function(i, selected) { //双重循环判断. 每个付给selected变量.
			var temp = 0; //or false
			for (j = 0; j < array.length; j++) {
				if($(selected).val() == array[j]){
					temp = 1;
					break ;
				}
			}
			
			if(temp==0){
				$("#SelOpts").append("<option value='"+$(selected).val()+"'>"+$(selected).text()+"</option>");
			}
			temp = 0;
		});
		//setSel();
	}
	
	/*
	 *点击确定
	*/
	function doConfirm(){

		
		
		//way2:传拼串. IE9等可用
		var tempSel="";
		//alert("长度:"+$("#SelOpts option").length);
		$("#SelOpts option").each(function(){
			//alert(2);
			var val=$(this).val();
			var txt=$(this).text();
			alert(val+""+txt);
			if(tempSel==""){ //第一次不要,
				tempSel=val+":"+txt;
			}else{
				tempSel=tempSel+","+val+":"+txt;
			}
			
		})
		parent.returnValue = tempSel; //★ 传递拼串.
		parent.close();
		
		//way1 B:数组. 无法子传递 父.只有IE8可用
		//var result = new Array();
		//$("#SelOpts option").val();  //遍历获取值.
		/* 
		var i = 0;
		$("#SelOpts option").each(function(){
			var val=$(this).val();
			var txt=$(this).text();
			result[i]=val+":"+txt; //i无索引.长度不确定啊.
			i++;
		})
		
		//parent.returnValue = result; //父窗体的值.
		*/
	}
	
	/*
	 * 删除选中
	*/
	function moveLeft(){
		$("#SelOpts option:selected").remove();
		setSel();	
	}
	
	//获取右边 已有的 所有选中的信息
	function getSelectedId() {
		var array = new Array(); //数组.
		$("#SelOpts option").each(function() {
			array.push($(this).val());
		});
		return array;
	}

	/*
		翻页
	 */
	function myLandPageClick(url, pageNo) {
		var visUrl = url + pageNo;

		$.post(visUrl, function(data) {
			$("#showAllData").replaceWith(data);
		})
	}
	
	function doClose() {
		
		parent.close(); //public..jsp关闭可.
	}
	
	function doClear(){
		//确定吗?
		$("#SelOpts option").each(function(){  //遍历集合元素.
			//$("#SelOpts option").remove(); //可  |无remove all.
			$(this).remove(); //也可.
		});
		//setSel();
	}
	
	//左边的模糊查询
	function searchDatas(){
		var url;
		var sechName = $("#sechName").val();
		if($.trim(sechName)==''){
			url = "${pageContext.request.contextPath}/adminx/searchData.do?resKey="+ resKey;
		}else{
			url = "${pageContext.request.contextPath}/adminx/searchData.do?resKey="+ resKey+"&sechName="+sechName;
		}
		url = encodeURI(encodeURI(url));  //URL编码与二次encodeURI 
		$.post(url, function(data) {
			$("#showAllData").replaceWith(data);  //左边的页面.
		});
	}
	
	<%--设置选择项--%>
	function setSel(){
		//不传递数组
		var seLOpts = document.all("SelOpts"); //所有元素的集合. ★)
		var lens = selOpts.options.length;
		var SEL_OPTS=document.all("SEL_OPTS");
		var tempSel="";
		for(var i=0;i<lens;i++){
			var val=selOpts.options[i].value;
			var showName=selOpts.options[i].innerText;
			if(tempSel==""){
				tempSel=val+":"+showName;
			}else{
				tempSel=tempSel+","+val+":"+showName;
			}
		}
		SEL_OPTS.value=tempSel; //付给 ,:的格式.
	}
	
</script>
</head>
<body>

	<table width="100%"  ><%--border="1px solid black;" --%>
		<tr>
			<td align="right">
			<a href="#" onclick="doConfirm();">确定</a>
			<a href="#" onclick="doClose();">关闭</a>
			<a href="#" onclick="doClear();">清除</a>
			</td>
		</tr>
		<tr>
			<td>
				<hr/>
			</td>
		</tr>
	</table>
	<table width="100%">
		<tr>
			<td colspan="3">
				<table width="100%" border="1">
					<tr>
						<td>
							名称:
						</td>
						<td>
							<input type="text" id="sechName" name="sechName"/>
						</td>
						<td>
							<input type="button" onclick="searchDatas();" value="查询">
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td width="40%">
				<div id="showAllData"></div>
			</td>

			<td width="20%">
				<input type="button" value="增加 >" onclick="addSelect()" />
				<input type="button" value="< 删除 " onclick="moveLeft()">
			</td>
			<td>
			<td width="40%">
			<%--已选项 --%>
				<div id="showSelectData">
				<input type="hidden" name="SEL_OPTS" value="${SEL_OPTS }"/> <%--怎么传值? --%>
					<select id="SelOpts" name="SelOpts" size='35'
						style="width: 150; height: 400" multiple="multiple">
						<c:forTokens items="${info}" delims="|" var="message">
							<c:set var="oneKeyArr" value="${fun:split(message, ',') }"
								scope="page"></c:set>
							<option value="${pageScope.oneKeyArr[0]}">${pageScope.oneKeyArr[1]}</option>
						</c:forTokens>
					</select>
				</div>
			</td>
		</tr>
	</table>
</body>
</html>	

resDataList.jsp simpleHelp.jsp已加载就ajax请求的嵌入页面
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/webcustomer/pagination.css" />
<div id="showAllData">
	<c:choose>
		<c:when test="${empty resDataList}">
			没有权限信息!
		</c:when>
		<c:otherwise>
			<select id="AllOpts" name= "AllOpts" size='35' style="width:150 ; height:400;" multiple="multiple">
				<c:forEach items="${resDataList}" var="resData">
					<option value='${resData.id }'>${resData.name }</option>
				</c:forEach>
			</select>
			${bar}
		</c:otherwise>
	</c:choose>
</div>

pubHelp.jsp 点击帮助,用于嵌套的.
<%@ page contentType="text/html; charset=utf-8"%>
<%@ include file="/common/common.jsp"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="java.util.Enumeration"%>
<HTML>
	<HEAD>
		<TITLE>通用帮助</TITLE>
	</HEAD>
	<body>
		<table border="0" width="100%" cellspacing="0" cellpadding="0"
			bgcolor=white>
			<tr>
			</tr>
		</table>

		<%
		    Enumeration pname = request.getParameterNames();
		    String para = "";
		    String cmd = "";
		    while (pname.hasMoreElements()) {
		        String temp = (String) pname.nextElement();
		        if (!temp.equals("url")) {
		            if (para.equals("")) {
		                para = temp + "=";
		            } else {
		                para = para + "&" + temp + "=";
		            }
		            para += request.getParameter(temp);
		        } else
		            cmd = request.getParameter(temp);
		    }
		%>

		<iframe
			style="width: 100%; height: 495px;"
			FRAMEBORDER=0 SCROLLING=yes id="ifFrm" name="ifFrm"
			src=""></IFRAME>
	</body>
</HTML>
<script language="javascript">

function init(){
	var ifSrc = "<%=cmd + '?' + para%>";
	var ifFrm=document.all("ifFrm");
	ifFrm.src = ifSrc;
}
init();

</script>
	



struts-adminx.xml 控制权限的
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN"
    "http://struts.apache.org/dtds/struts-2.1.7.dtd">
<struts>
    <!-- 后台管理员action配置 -->
    <package name="adminx" extends="default" namespace="/adminx">
    	<!-- 后台管理员拦截器队列 -->
    	<interceptors>
    		<interceptor-stack name="adminxInterceptorStack">
    			<interceptor-ref name="myLandInterceptorStack"></interceptor-ref>
    		</interceptor-stack>
    	</interceptors>
    	<default-interceptor-ref name="adminxInterceptorStack"/>
    	
    	<!-- 后台用户登录action -->
    	<action name="adminLogin" class="com.myland.jp.adminx.login.action.AdminLoginAction">
    		<result name="success">/adminx/login/adminLogin.jsp</result>
    		<result name="home">/adminx/home/home.jsp</result>
    	</action>
    	
    	<!-- 后台考题管理action -->
    	<action name="examAction" class="com.myland.jp.adminx.exam.action.ExamAction">
    		<result name="success">/adminx/exam/examList.jsp</result>
    		<result name="addexam">/adminx/exam/examAdd.jsp</result>
    		<result name="editexam">/adminx/exam/examUpdate.jsp</result>
    		<result name="batchAddExam">/adminx/exam/examBatchAdd.jsp</result>
    	</action>
    	
    	<!-- 后台试卷管理action -->
    	<action name="testPaperAction" class="com.myland.jp.adminx.testpaper.action.TestPaperAction">
    		<result name="success">/adminx/testpaper/testPaperList.jsp</result>
    		<result name="addtestpaper">/adminx/testpaper/testPaperAdd.jsp</result>
    		<result name="forupdatetestpaper">/adminx/testpaper/testPaperUpdate.jsp</result>
    	</action>
    	
    	<!-- 学习计划 -->
    	<action name="plan" class="com.myland.jp.adminx.plan.action.PlanAction">
    		<result name="success">/adminx/plan/planList.jsp</result>
    		<result name="conditionSearch">/adminx/plan/planList.jsp</result>
    		<result name="planNode">/adminx/plan/planList.jsp</result>
    		<result name="addPlan">/adminx/plan/planAdd.jsp</result>
    		<result name="modifyPlan">/adminx/plan/planModify.jsp</result>
    	</action>
    	<!-- 学习计划节点 -->
    	<action name="planNode" class="com.myland.jp.adminx.planNode.action.PlanNodeAction">
    		<result name="success">/adminx/plan/planNodeList.jsp</result>
    		<result name="planList" type="redirect">/adminx/plan.do</result>
    		<result name="planDetail">/adminx/plan/planNodeAdd.jsp</result>
    		<result name="planNodeInterface">/adminx/plan/interfaceList.jsp</result>
    		<result name="planNodeJsMethod">/adminx/plan/jsPlanNode.jsp</result>
    		<result name="orderPlanNode">/adminx/plan/orderPlanNode.jsp</result>
    	</action>
    	<action name="planNodeCourse" class="com.myland.jp.adminx.planNode.action.PlanNodeAction" method="showPlanCourse">
    		<result name="planNodeCourse">/adminx/plan/courseList.jsp</result>
    	</action>
    	<action name="planNodeExam" class="com.myland.jp.adminx.planNode.action.PlanNodeAction" method="showPlanExam">
    		<result name="planNodeExam">/adminx/plan/examList.jsp</result>
    	</action>
    	<!-- 代理商 -->
    	<action name="agent" class="com.myland.jp.adminx.agent.action.AgentAction">
    		<result name="success">/adminx/agent/agentList.jsp</result>
    		<result name="addAgent">/adminx/agent/agentAdd.jsp</result>
    		<result name="modifyAgent">/adminx/agent/agentModify.jsp</result>
    		<result name="detailAgent">/adminx/agent/agentDetail.jsp</result>
    		<result name="binded">/adminx/agent/bindedPlanAgent.jsp</result>
    	</action>
    	<!--获取学习计划  -->
    	<action name="bindAgent"  class="com.myland.jp.adminx.agent.action.AgentAction" method="bindAgent">
    		<result name="bindAgent">/adminx/agent/bindAgent.jsp</result>
    	</action>
    	<!-- 已绑定学习计划 -->
    	<action name="bindedPlan"  class="com.myland.jp.adminx.agent.action.AgentAction" method="bindedPlan">
    		<result name="binded">/adminx/agent/bindedPlanAgent.jsp</result>
    	</action>
    	<!-- 供应商 -->
    	<action name="cont" class="com.myland.jp.adminx.cont.action.ContAction">
    		<result name="success">/adminx/cont/contList.jsp</result>
    		<result name="addAgent">/adminx/cont/contAdd.jsp</result>
    		<result name="modifyAgent">/adminx/cont/contModify.jsp</result>
    		<result name="detailAgent">/adminx/cont/contDetail.jsp</result>
    	</action>
    	<!-- 账户信息 -->
    	<action name="payAccnt" class="com.myland.jp.adminx.payAccnt.action.PayAccntAction">
    		<result name="success">/adminx/payAccnt/payAccntList.jsp</result>
    		<result name="addPayAccnt">/adminx/payAccnt/payAccntAdd.jsp</result>
    		<result name="modifyPayAccnt">/adminx/payAccnt/payAccntModify.jsp</result>
    	</action>
    	
    	<action name="addPayAccntAction" class="com.myland.jp.adminx.payAccnt.action.PayAccntAction" method="addPayAccnt">
    		<result name="addPayAccnt">/adminx/payAccnt/payAccntAdd.jsp</result>
    	</action>
    	
    	<action name="agentList" class="com.myland.jp.adminx.payAccnt.action.PayAccntAction" method="loadAgentList">
    		<result name="agentList">/adminx/payAccnt/agentList.jsp</result>
    	</action>
    	<action name="contList" class="com.myland.jp.adminx.payAccnt.action.PayAccntAction" method="loadContList">
    		<result name="contList">/adminx/payAccnt/contList.jsp</result>
    	</action>
    	
    	<!-- 学员查询 -->
    	<action name="viewPerson" class="com.myland.jp.adminx.viewPerson.action.ViewPersonAction">
    		<result name="success">/adminx/viewPerson/viewPersonList.jsp</result>
    	</action>
    	<!-- 银行信息 -->
    	<action name="payBank" class="com.myland.jp.adminx.payBank.action.PayBankAction">
    		<result name="success">/adminx/payBank/payBankList.jsp</result>
    		<result name="addPayBank">/adminx/payBank/payBankAdd.jsp</result>
    		<result name="modifyPayBank">/adminx/payBank/payBankModify.jsp</result>
    	</action>
    	<!-- 代理商充值 -->
    	<action name="agentChange" class="com.myland.jp.adminx.agentChange.action.AgentChangeAction">
    		<result name="success">/adminx/agentChange/agentList.jsp</result>
    		<result name="modifyAgent">/adminx/agentChange/agentModify.jsp</result>
    		<result name="angetChange">/adminx/agentChange/agentChangeList.jsp</result>
    		<result name="modifyAngetChagne">/adminx/agentChange/agentChangeModify.jsp</result>
    		<result name="payInvoice">/adminx/agentChange/agentInvoiceModify.jsp</result>
    		<result name="agentChangeConfirm">/adminx/agentChange/agentChangeConfirm.jsp</result>
    	</action>
    	<action name="agentChangeLoad" class="com.myland.jp.adminx.agentChange.action.AgentChangeAction" method="loadAgentChange">
    		<result name="angetChange">/adminx/agentChange/agentChangeList.jsp</result>
    	</action>
    	<action name="addAgentChangeAction" class="com.myland.jp.adminx.agentChange.action.AgentChangeAction" method="addAgentChange">
    		<result name="addAgentChange">/adminx/agentChange/agentChangeAdd.jsp</result>
    	</action>
    	<action name="agentChangeAccnt" class="com.myland.jp.adminx.agentChange.action.AgentChangeAction" method="initPayAccntList">
    		<result name="payAccntList">/adminx/agentChange/payAccntList.jsp</result>
    	</action>
    	<action name="agentChangeBank" class="com.myland.jp.adminx.agentChange.action.AgentChangeAction" method="initPayBankList">
    		<result name="payBankList">/adminx/agentChange/payBankList.jsp</result>
    	</action>
    	<action name="agentChangeConfirmAction" class="com.myland.jp.adminx.agentChange.action.AgentChangeAction" method="agentChangeConfirm">
    		<result name="agentChagneConfirm">/adminx/agentChange/agentChangeConfirm.jsp</result>
    	</action>
    	<!-- 部门操作 -->
    	<action name="deptAction" class="com.myland.jp.adminx.dept.action.DeptAction">
    		<result name="success">/adminx/dept/deptList.jsp</result>
    		<result name="open">/adminx/dept/deptUpdate.jsp</result>
    		<result name="add" type="redirect">/adminx/deptAction.do?conditions=keep</result>
    		<result name="del" type="redirect">/adminx/deptAction.do?conditions=keep</result>
    		<result name="update" type="redirect">/adminx/deptAction.do?conditions=keep</result>
    	</action>
    	
    	<!-- 角色操作action -->
    	<action name="roleAction" class="com.myland.jp.adminx.role.action.RoleAction">
    		<result name="success">/adminx/role/roleList.jsp</result>
    		<result name="add" type="redirect">/adminx/roleAction.do?conditions=keep</result>
    		<result name="open">/adminx/role/roleUpdate.jsp</result>
    		<result name="update" type="redirect">/adminx/roleAction.do?conditions=keep</result>
    		<result name="del" type="redirect">/adminx/roleAction.do?conditions=keep</result>
    		<result name="detail">/adminx/role/roleDetail.jsp</result>
    	</action>
    	
    	<!-- 系统用户操作action begin -->
    	<action name="userAction" class="com.myland.jp.adminx.user.action.UserAction">
    		<result name="add" type="redirect">/adminx/getUsersInfo.do?conditions=keep</result>
    		<result name="view">/adminx/user/userView.jsp</result>
    		<result name="open">/adminx/user/userUpdate.jsp</result>
    		<result name="update" type="redirect">/adminx/getUsersInfo.do?conditions=keep</result>
    		<result name="del" type="redirect">/adminx/getUsersInfo.do?conditions=keep</result>
    	</action>
    	
    	<action name="getUsersInfo" class="com.myland.jp.adminx.user.action.UserAction" method="getUsersInfo">
    		<result name="list">/adminx/user/userList.jsp</result>
    	</action>
    	
    	<action name="openUserAdd" class="com.myland.jp.adminx.user.action.UserAction" method="openUserAdd">
    		<result name="openUserAdd">/adminx/user/userAdd.jsp</result>
    	</action>
    	<!-- 系统用户操作action end -->
    	
    	<!-- 数据权限操作action -->
    	<action name="resDataAction" class="com.myland.jp.adminx.resdata.action.ResDataAction">
    		<result name="open">/adminx/resdata/resdataDetail.jsp</result>
    		<result>/adminx/resdata/resdataDetail.jsp</result>
    	</action>
    	
    	 <!-- 方法名直接指定action的方法 ok-->
    	 
    	<!-- 安全性,使用method,防止动态调用 为了以后  注释不要写到里面-->
    	<action name="simpleHelp" class="com.myland.jp.adminx.resdata.action.SimpleHelpAction" method="simpleHelp">
    		<result name="success">/adminx/resdata/simpleHelp.jsp</result>
    	</action>
    	<!-- 请求 一样.帮助页面 左边的请求 故意不写 与方法名相同,保证权限的. -->
    	<action name="searchData" class="com.myland.jp.adminx.resdata.action.SimpleHelpAction" method="resDataSearch">
    		<result name="list">/adminx/resdata/resDataList.jsp</result>
    	</action>
    	
    	<!-- 数据权限操作 end -->
    	
    	
    	
    	<!-- 后台订单相关操作 -->
    	<action name="queryPayOrderAction" class="com.myland.jp.adminx.pay.action.PayOrderAdminAction"  method="queryPayOrderInfoByPage">
    		<result name="payOrderFlowList">/adminx/pay/payOrderListAdminx.jsp</result>
    		<result name="payOrdersFlowList">/adminx/pay/payOrdersListAdminx.jsp</result>
    		<result name="payResult">/web/pay/alipayapi.jsp</result>
    		<result name="payResults">/web/pay/alipayapi.jsp</result>
    	</action>
    	
    	<action name="examVersionAction" class="com.myland.jp.adminx.exam.action.ExamVersionAction">
    		<result name="success">/adminx/exam/appExamVersion.jsp</result>
    	</action>
    	
    	<!-- 类别体系 begin -->
		<action name="catTypeAction" class="com.myland.jp.adminx.catType.action.CatTypeAction">
			<result>/adminx/catType/demo-index.jsp</result>
		</action>
    	<!-- 类别体系end -->
    	
    	<!-- 章节管理 begin -->
		<action name="chapterAction" class="com.myland.jp.adminx.chapter.action.ChapterAction">
			<result name="success">/adminx/chapter/chapterParentList.jsp</result>
			<result name="insertChapterParent">/adminx/chapter/chapterParentAdd.jsp</result>
			<result name="updateChapterParent">/adminx/chapter/chapterParentUpdate.jsp</result>
			<result name="toWorks">/adminx/chapter/works.jsp</result>
			<result name="chapterTopList">/adminx/chapter/chapterTopList.jsp</result>
			<result name="chapterTree">/adminx/chapter/chapterTree.jsp</result>
			<result name="chapterList">/adminx/chapter/chapterList.jsp</result>
			<result name="insertChapter">/adminx/chapter/chapterAdd.jsp</result>
			<result name="updateChapter">/adminx/chapter/chapterUpdate.jsp</result>
		</action>
    	<!-- 章节管理end -->
    	
    	<!-- 章节考题管理 begin -->
		<action name="chapterExamAction" class="com.myland.jp.adminx.chapter.action.ChapterExamAction">
			<result name="success">/adminx/chapter/examHelp.jsp</result>
		</action>
		
		<action name="examListAction" class="com.myland.jp.adminx.chapter.action.ChapterExamAction" method="findExamList">
			<result name="examList">/adminx/chapter/examList.jsp</result>
		</action>
		
    	<!-- 章节考题管理end -->
    	
    	<!-- 课程管理 begin -->
		<action name="courseAction" class="com.myland.jp.adminx.course.action.CourseAction">
			<result name="success">/adminx/course/courseList.jsp</result>
			<result name="insertCourse">/adminx/course/courseAdd.jsp</result>
			<result name="updateCourse">/adminx/course/courseUpdate.jsp</result>
		</action>
    	<!-- 课程管理end -->
    	
    	<!-- 课程配置章节begin -->
    	<action name="coursePowerAction" class="com.myland.jp.adminx.course.action.CoursePowerAction">
    		<result name="coursePower">/adminx/course/coursePower.jsp</result>
    		<result name="chapterSelList">/adminx/course/chapterSelectList.jsp</result>
    		<result name="insert" type="redirect">/adminx/chapterSelListAction.do?id=${id}</result>
    		<result name="del" type="redirect">/adminx/chapterSelListAction.do?id=${id}</result>
    	</action>
    	
    	<action name="chapterListAction" class="com.myland.jp.adminx.course.action.CoursePowerAction" method="findChapterList">
    		<result name="chapterList">/adminx/course/chapterList.jsp</result>
    	</action>
    	
    	<action name="chapterSelListAction" class="com.myland.jp.adminx.course.action.CoursePowerAction" method="findSelectChapterList">
    		<result name="chapterSelList">/adminx/course/chapterSelectList.jsp</result>
    	</action>
    	
    	<action name="delCourseChapter" class="com.myland.jp.adminx.course.action.CoursePowerAction" method="delCourseChapter">
    		<result name="chapterSelList">/adminx/course/chapterSelectList.jsp</result>
    	</action>
    	<!-- 课程配置章节end -->
    	
    	<action name="payInvoiceAdmin" class="com.myland.jp.adminx.pay.action.PayInvoiceAdminAction">
    		<result name="payInvoiceList">/adminx/pay/payInvoiceListAdminx.jsp</result>
    		<result name="payInvoice" type="chain">
    			<param name="method">queryInvoice</param>
    			<param name="actionName">payInvoiceAdmin</param> 
    			<param name="namespace">/adminx</param> 
    		</result>
    	</action>
    	
    	<!-- 字典维护 -->
    	<action name="queryAllCode" class="com.myland.jp.adminx.dic.action.DicAction">
    		<result>/adminx/dic/dicMain.jsp</result> <!-- 默认的不想用,配上 -->
    		<result name="dicInit">/adminx/dic/dicMain.jsp</result>
    		<result name="open">/adminx/dic/dicUpdate.jsp</result>
    		<result name="update" type="redirect">/adminx/queryAllCode!queryAllCode.do?conditions=keep</result>
    		<result name="del" type="redirect">/adminx/queryAllCode!queryAllCode.do?conditions=keep</result>
    		<result name="aud_success">/adminx/dic/aud.jsp</result>
    		<!--  <result>${url}</result>-->
    	</action>
    	
    </package>
    
</struts>




你可能感兴趣的:(java,jquery,jsp,Ajax)