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

📄 ajax_agency_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/>
  <tops:includeCSS fileName="style"/>
  <tops:includeJs fileName="common"/>
  <tops:includeAjaxRequiredFiles fileName="AjaxTopsJ2eeAjax"/>
<script language="JavaScript" type="text/javascript">
var trObj;
function deleteMethod(methodId,obj){
  if(confirm("确定要删除该方法?")){
    trObj=obj.parentElement.parentElement;
    AjaxTopsJ2eeAjax.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;
    AjaxTopsJ2eeAjax.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;
    AjaxTopsJ2eeAjax.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;
    AjaxTopsJ2eeAjax.deleteParam(methodId,paramId,deleteParamCallBack);
  }else{
    return false;
  }
}

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

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

function finishMethodCallBack(result){
  trObj.innerHTML='<font color="ee8800">已完成('+result+')</font>';
}
  </script>
  </head>
  <title>ajax代理类设计</title>
  <body>
  <html:form action="/actTopsJ2eeAjaxAgency" method="get">
    <input type="hidden" name="method"/>
    <tops:showPageFunction pageFunction="ajax代理类设计"/>
    <tops:toolbar>
      <tops:toolbutton caption="新增 " method="add" image="page_add" checkAtClient="false "/>
      <tops:toolbutton caption="删除 " method="delete" image="delete" confirm="确定删除这些AJAX的代理类吗 ?" checkAtClient="false"/>
      <tops:toolbutton caption="查询" method="search" image="application_form_magnify" checkAtClient="false"/>
    </tops:toolbar>
    <table cellpadding="0" cellspacing="1" border="0" width="100%" id="PowerTable">
      <tr align="center">
        <td height="20" width="5%" nowrap class="title">
          <tops:selectAllCheckBox/>
        </td>
        <td width="5%" nowrap class="title">序号</td>
        <td width="15%" nowrap class="title">类名称</td>
        <td width="30%" nowrap class="title">类的包名</td>
        <td width="15%" nowrap class="title">类代码</td>
        <td width="7%" nowrap class="title">负责人</td>
        <td width="15%" nowrap class="title">备注</td>
        <td width="13%" 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">
              <tops:selectCheckBox/>
            </td>
            <td>
              <tops:tableOrd/>
            </td>
            <td>
              <tops:link action="actTopsJ2eeAjaxAgency" showcaptionalways="true" captionbeanproperty="page-obj-ajaxClassName" caption="查看代理类" method="modify" argname1="id" argbeanproperty1="page-obj-id"/>
            </td>
            <td>
              <bean:write name="obj" property="ajaxClassPackage"/>
            </td>
            <td>
              <bean:write name="obj" property="ajaxClassCode"/>
            </td>
            <td>
              <bean:write name="obj" property="managerUser"/>
            </td>
            <td>
              <bean:write name="obj" property="controlRemark"/>
            </td>
            <td>
              <tops:link action="actTopsJ2eeAjaxAgencyMethod" caption="新方法" argname1="id" argbeanproperty1="page-obj-id" method="add"/>
            </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="actTopsJ2eeAjaxAgencyMethod.do?method=modify" paramName="method" paramProperty="id" paramId="id">
                          <bean:write name="method" property="methodCode"/>
                        </html:link>
                        (
                        <span><bean:write name="method" property="paramCodeList" filter="false"/></span>
                        )
                        <html:link action="actTopsJ2eeAjaxagencyMethodParam.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>
  </html:form>
  </body>
</html:html>

⌨️ 快捷键说明

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