📄 action_list.jsp
字号:
<%@page contentType="text/html; charset=GBK"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/tops.tld" prefix="tops"%>
<html:html>
<head>
<%
java.util.List objList=com.tops.j2ee.object.control.EmTopsJ2eeObj.getInstance().findAll();
java.util.List controlList=com.tops.j2ee.control.control.EmTopsJ2eeControl.getInstance().findAll();
request.setAttribute("objList",objList);
request.setAttribute("controlList",controlList);
%>
<html:base/>
<LINK REL="stylesheet" TYPE="text/css" href="<%=request.getContextPath()%>/_normal/css/style.css">
<script language="javascript" src="<%=request.getContextPath()%>/_normal/script/common.js" type="text/javascript"></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/engine.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/util.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/AjaxTopsJ2eeAction.js'></script>
<script language="JavaScript" type="text/javascript">
function addNew() {
window.location = '<%=request.getContextPath()%>/actTopsJ2eeAction.do?method=add';
}
function del() {
var isSelected = false;
if (document.all.del_checkbox_id.checked) {
isSelected = true;
}
else {
for (var i = 0; i < document.all.del_checkbox_id.length; i++) {
if (document.all.del_checkbox_id[i].checked == true) {
isSelected = true;
break;
}
}
}
if (isSelected) {
if (!confirm("确定删除所选记录?")) {
return false;
}
document.forms[0].action ='<%=request.getContextPath()%>/actTopsJ2eeAction.do?method=delete';
document.forms[0].submit();
}
else {
alert("请至少选择一条!");
return false;
}
}
var trObj;
function deleteMethod(methodId,obj){
if(confirm("确定要删除该方法?")){
trObj=obj.parentElement.parentElement;
AjaxTopsJ2eeAction.deleteMethod(methodId,deleteMethodCallBack);
}else{
return false;
}
}
function deleteMethodCallBack(msg){
if(msg=='true'){
trObj.parentElement.removeChild(trObj);
}else{
alert('方法删除失败!');
}
}
var _methodId;
function discardMethod(methodId,obj){
if(confirm("确定要弃用该方法?")){
trObj=obj.parentElement;
_methodId=methodId;
AjaxTopsJ2eeAction.discard(methodId,discardMethodCallBack);
}else{
return false;
}
}
function discardMethodCallBack(msg){
if(msg=='true'){
trObj.innerHTML='<a onclick=startUsingMethod("'+_methodId+'",this) style="cursor:hand" title="启用方法">启用方法</a>';
}else{
alert('方法弃用失败!');
}
}
function startUsingMethod(methodId,obj){
if(confirm("确定要启用该方法?")){
trObj=obj.parentElement;
_methodId=methodId;
AjaxTopsJ2eeAction.startUsing(methodId,startUsingMethodCallBack);
}else{
return false;
}
}
function startUsingMethodCallBack(msg){
if(msg=='true'){
trObj.innerHTML='<a onclick=discardMethod("'+_methodId+'",this) style="cursor:hand" title="弃用方法">弃用方法</a>';
}else{
alert('方法启用失败!');
}
}
function FinishMethod(methodId,obj){
if(confirm("确定方法已完成?")){
trObj=obj.parentElement;
_methodId=methodId;
AjaxTopsJ2eeAction.finishMethod(methodId,finishMethodCallBack);
}else{
return false;
}
}
function finishMethodCallBack(result){
trObj.innerHTML='<font color="ee8800">已完成('+result+')</font>';
}
function creatBaseAction(obj){
var controlId=obj.parentElement.children[0].value;
var objId=obj.parentElement.children[1].value;
if(controlId==""){
alert('请选择创建Action的控制器!');
return false;
}
if(objId==''){
alert('请选择创建Action的主对象!');
return false;
}
window.location="<%=request.getContextPath()%>/actTopsJ2eeAction.do?method=createBaseAction&controlId="+controlId+"&objId="+objId;
}
</script>
</head>
<title>Action对象管理</title>
<body>
<form action="" method="post">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="70%" nowrap class="location">您的位置:Action对象管理</td>
<td nowrap class="location"> </td>
</tr>
</table>
<span style="cursor:hand;" onclick="cancel_loadingDIV()"> <div id="loading_div" style="z-Index:1000;overflow:auto;height:105;background:#eeeeee;border:solid 1px #666666;;position:absolute;width:380;filter:progid:dximagetransform.microsoft.dropshadow(color=#cccccc);padding:10px;display:none"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td height="80" align="center" width="99%"> <center> 数据处理中,请稍等... <marquee direction="right" scrollamount="9" scrolldelay="80"> <span style="filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1,StartColorStr='#FFFFFF', EndColorStr='#7491DC')"></span> <span style="filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=1,StartColorStr='#7491DC',EndColorStr='#FFFFFF')"></span> </marquee> </center> </td> </tr> </table> </div> </span>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="7%" id="addNew" align="center" valign="middle" nowrap class="toolbar" onMouseOver="OMO()" onMouseOut="OMOU()" onClick="addNew()">
<img src="<%=request.getContextPath()%>/_normal/toolbar_pic/page_add.gif" alt="新增">
新增Action
</td>
<td width="1%" align="center" valign="middle" nowrap class="toolbar">|</td>
<td width="7%" align="center" valign="middle" nowrap class="toolbar" onMouseOver="OMO()" onMouseOut="OMOU()" onclick="del()">
<img src="<%=request.getContextPath()%>/_normal/toolbar_pic/page_delete.gif" alt="删除">
删除
</td>
<td width="82%" align="center" valign="middle" nowrap class="toolbar">
<select name="controlId">
<option value="">--请选择创建Action的控制器--</option>
<logic:notEmpty name="controlList" scope="request">
<logic:iterate id="controlobj" name="controlList" scope="request">
<option value="<bean:write name="controlobj" property="id"/>"><bean:write name="controlobj" property="controlClassname"/></option>
</logic:iterate>
</logic:notEmpty>
</select>
<select name="objId">
<option value="">--请选择创建Action的对象--</option>
<logic:notEmpty name="objList" scope="request">
<logic:iterate id="mainObj" name="objList" scope="request">
<option value="<bean:write name="mainObj" property="id"/>"><bean:write name="mainObj" property="objCode"/></option>
</logic:iterate>
</logic:notEmpty>
</select>
<img alt="创建基本Action" src="<%=request.getContextPath()%>/_normal/toolbar_pic/spellcheck.gif" style="cursor:hand" onclick="creatBaseAction(this)"/>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="1" border="0" width="100%" id="PowerTable">
<tr align="center">
<td height="20" width="5%" nowrap class="title">
<input type="checkbox" style="cursor:hand;border:0" onclick="selectAll(this)" title="全选"/>
</td>
<td width="5%" nowrap class="title">序号</td>
<td width="15%" nowrap class="title">Action名称</td>
<td width="15%" nowrap class="title">Action类名</td>
<td width="10%" nowrap class="title">主对象</td>
<td width="10%" nowrap class="title">负责人</td>
<td width="13%" nowrap class="title">代码生成时间</td>
<td width="10%" nowrap class="title">操作</td>
<td width="7%" nowrap class="title">明细</td>
</tr>
<logic:notEmpty name="objlist">
<logic:iterate id="obj" name="objlist" indexId="index">
<tr align="center">
<td height="20">
<input type="checkbox" name="del_checkbox_id" value="<bean:write name="obj" property="id"/>" style="border:0">
</td>
<td><%=(index.intValue() + 1)%> </td>
<td align="center">
<bean:write name="obj" property="actionName"/>
</td>
<td>
<tops:link action="actTopsJ2eeAction" captionbeanproperty="page-obj-actionClassname" method="modify" argname1="id" argbeanproperty1="page-obj-id" caption="dd"/>
</td>
<td>
<bean:write name="obj" property="mainObjTypeCode"/>
</td>
<td>
<bean:write name="obj" property="managerUser"/>
</td>
<td>
<bean:write name="obj" property="fd_CodeGenDate"/>
</td>
<td>
<html:link action="/actTopsJ2eeActionMethod?method=add" paramId="actionId" paramName="obj" paramProperty="id">新方法</html:link>
</td>
<td>
<img src="<%=request.getContextPath()%>/_normal/toolbar_pic/unwrap.gif" alt="展开详细列表" onClick="showDetail(this,'<%=request.getContextPath()%>')" style="cursor:hand">
</td>
</tr>
<tr align="center" style="display:none">
<td colspan="9">
<table cellpadding="0" cellspacing="0" border="0" width="95%">
<logic:notEmpty name="obj" property="methodList">
<logic:iterate id="method" name="obj" property="methodList">
<tr align="left">
<td height="20">
<img alt="" src="<%=request.getContextPath()%>/_normal/toolbar_pic/bullet_feed.gif" />public ActionForward
<html:link action="actTopsJ2eeActionMethod.do?method=modify" paramName="method" paramProperty="id" paramId="methodId">
<bean:write name="method" property="methodCode"/>
</html:link>
(<span>ActionMapping mapping, ActionForm form,<br/>
HttpServletRequest request,HttpServletResponse response</span>)
<a onclick="deleteMethod('<bean:write name="method" property="id"/>',this)" style="cursor:hand" title="删除方法">删除方法</a>
<logic:equal value="" name="method" property="fd_DeleteDate">
<span><a onclick="discardMethod('<bean:write name="method" property="id"/>',this)" style="cursor:hand" title="弃用方法">弃用方法</a></span>
</logic:equal>
<logic:notEqual value="" name="method" property="fd_DeleteDate">
<span><a onclick="startUsingMethod('<bean:write name="method" property="id"/>',this)" style="cursor:hand" title="启用方法">启用方法</a></span>
</logic:notEqual>
<logic:equal value="" name="method" property="fd_FinishDate">
<span><a onclick="FinishMethod('<bean:write name="method" property="id"/>',this)" style="cursor:hand" title="完成方法">完成方法</a></span>
</logic:equal>
<logic:notEqual value="" name="method" property="fd_FinishDate">
<font color="ee8800">已完成(<bean:write name="method" property="fd_FinishDate"/>)</font>
</logic:notEqual>
</td>
</tr>
</logic:iterate>
</logic:notEmpty>
<logic:empty name="obj" property="methodList">
<tr>
<td height="20" align="center">没有方法</td>
</tr>
</logic:empty>
</table>
</td>
</tr>
</logic:iterate>
</logic:notEmpty>
<logic:empty name="objlist">
<tr>
<td colspan="9" height="20" align="center">没有数据</td>
</tr>
</logic:empty>
</table>
</form>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -