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

📄 control_list.jsp

📁 Jbuilder2006开发的严格按MVC设计模式组织开发过程
💻 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>
  <html:base/>
  <%
    java.util.List objList=com.tops.j2ee.object.control.EmTopsJ2eeObj.getInstance().findAll();
    request.setAttribute("objList",objList);
  %>
  <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/AjaxTopsJ2eeControl.js'></script>
<script language="JavaScript" type="text/javascript">
function addNew() {
  window.location = '<%=request.getContextPath()%>/actTopsJ2eeControl.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()%>/actTopsJ2eeControl.do?method=delete';
    document.forms[0].submit();
  }
  else {
    alert("请至少选择一条!");
    return false;
  }
}


var trObj;
function deleteMethod(methodId,obj){
  if(confirm("确定要删除该方法?")){
    trObj=obj.parentElement.parentElement;
    AjaxTopsJ2eeControl.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;
    AjaxTopsJ2eeControl.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;
    AjaxTopsJ2eeControl.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 deleteParam(methodId,paramId,obj){
  if(confirm("确定要删除该参数?")){
    trObj=obj.parentElement;
    AjaxTopsJ2eeControl.deleteParam(methodId,paramId,deleteParamCallBack);
  }else{
    return false;
  }
}

function deleteParamCallBack(result){
  trObj.innerHTML=result;
}

function creatBaseControl(obj){
  var id=obj.parentElement.children[0].value;
  if(id==""){
    return;
  }
  window.location="<%=request.getContextPath()%>/actTopsJ2eeControl.do?method=creatBaseControl&id="+id;
}

function FinishMethod(methodId,obj){
  if(confirm("确定方法已完成?")){
    trObj=obj.parentElement;
    _methodId=methodId;
    AjaxTopsJ2eeControl.finishMethod(methodId,finishMethodCallBack);
  }else{
    return false;
  }
}

function finishMethodCallBack(result){
  trObj.innerHTML='<font color="ee8800">已完成('+result+')</font>';
}
</script>
  </head>
  <title>控制器对象管理</title>
  <body>
  <form action="" method="post">
  <table cellpadding="0" cellspacing="0" border="0" width="100%">
    <tr>
      <td width="70%" nowrap class="location">您的位置:控制器对象管理</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="新增">
        新增控制器
      </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>
       <option value="">--请选择创建控制器的对象--</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="创建基本控制器" src="<%=request.getContextPath()%>/_normal/toolbar_pic/spellcheck.gif" style="cursor:hand" onclick="creatBaseControl(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">控制器名称</td>
      <td width="15%" nowrap class="title">java类名</td>
      <td width="10%" nowrap class="title">负责人</td>
      <td width="13%" nowrap class="title">代码生成时间</td>
      <td width="20%" 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="controlName"/>
          </td>
          <td>
            <tops:link action="actTopsJ2eeControl" captionbeanproperty="page-obj-controlClassname" method="modify" argname1="id" argbeanproperty1="page-obj-id" caption="dd"/>
          </td>
          <td>
            <bean:write name="obj" property="managerUser"/>
          </td>
          <td>
            <bean:write name="obj" property="fd_CodeGenDate"/>
          </td>
          <td>
            <bean:write name="obj" property="controlRemark"/>
          </td>
          <td>
          <html:link action="/actTopsJ2eeControlMethod?method=add" paramId="controlId" 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 &nbsp;
                    <bean:write name="method" property="returnObjTypeCode"/>
                    &nbsp;
                    <html:link action="actTopsJ2eeControlMethod.do?method=modify" paramName="method" paramProperty="id" paramId="methodId">
                    <bean:write name="method" property="methodCode"/>
                    </html:link>
                    (<span><bean:write name="method" property="paramCodeList" filter="false"/></span>)
                    <html:link action="actTopsJ2eeControlMethodParam.do?method=add" paramName="method" paramProperty="id" paramId="methodId">增加参数</html:link>
                    <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 + -