zoukankan      html  css  js  c++  java
  • dwz 刷新当前navtab

    List.jsp   其navtabId为TradingStrategy_31;
    
    <form method="post" action="${contextPath}/tts/stock/tradingstrategy/create"  class="pageForm required-validate" onsubmit="return validateCallback(this,navTabAjaxDone);" >/**  这句很重要**/
     <div class="pageHeader">
      <div class="searchBar">
       <ul class="searchContent">
        <li>    
         <label style=" 100px;">股票代码:</label>
         <input type="text" name="code"/>
        </li> 
        <li>
         <label style=" 100px;">起始日:</label>
         <input type="text" name="startDay"/>
        </li>
        <li>
         <label style=" 100px;">结束日:</label>
         <input type="text" name="endDay"/>
        </li>                
       </ul>
        </div>
    </form>
    
    <div class="pageContent" layoutH="160">
    
     <div class="panelBar">
      <ul class="toolBar">   
       <li><a class="delete" target="selectedTodo" rel="ids" href="${contextPath}/tts/stock/tradingstrategy/delete" title="确认要删除?"><span>删除交易策略</span></a></li>  
      </ul>
     </div>
     
     <table class="table" layoutH="162" width="100%">
      <thead>
       <tr>
        <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
        <th width="100">股票代码</th>
        <th width="100">起始日</th>
        <th width="100">结束日</th>
        <th >买卖标志</th>
        <th >触发条件</th>
        <th >委托价格</th>
        <th >委托数量</th>
        <th >证券市场</th>
        <th >报价方式</th>
        <th >状态码</th>
        <th >委托单号</th>
        <th >委托时间</th>
        <th >交易账户类型</th>
        <th width="130" orderField="createTime" class="${page.orderField eq 'createTime' ? page.orderDirection : ''}">创建时间</th>
       </tr>
      </thead>
      <tbody>
       <c:forEach var="item" items="${tradingStrategy}">
       <tr target="slt_uid" rel="${item.id}">
        <td><input name="ids" value="${item.id}" type="checkbox"></td>
        <td>${item.code}</td>
        <td>${item.startDay}</td>
        <td>${item.endDay}</td>
        <td>${item.bsFlag}</td>
        <td>${item.triggerCondition}</td>
        <td>${item.price}</td>
        <td>${item.quantity}</td>
        <td>
         <c:if test="${item.market==1 }">深市</c:if>
         <c:if test="${item.market==0 }">沪市</c:if>
        </td>
        <td>
         <c:if test="${item.entrustProp=='O' }">限价委托</c:if>
         <c:if test="${item.entrustProp=='Q' }">对手方最优价格</c:if>
         <c:if test="${item.entrustProp=='S'}">本方最优价格</c:if>
         <c:if test="${item.entrustProp=='T' }">即时成交剩余撤销</c:if>
         <c:if test="${item.entrustProp=='U' }">五档即成剩余撤销</c:if>
         <c:if test="${item.entrustProp=='V'}">全部成交或撤销</c:if>
         <c:if test="${item.entrustProp=='R'}">五档即成剩余转限</c:if>
        </td>
        <td>${item.status}</td>
        <td><c:if test="${item.orderDate!=null }">${item.orderNo}</c:if></td>
        <td>${item.orderDate}</td>
        <td>${item.accountType}</td>
        <td><fmt:formatDate value="${item.createTime}" pattern="yyyy-MM-dd"/></td>
       </tr>   
       </c:forEach>
      </tbody>
     </table>
     <!-- 分页 -->
     <dwz:pagination page="${page }"/>
    </div>
    
    spring mvc 服务器端代码
    
    AjaxObject ajaxObject = new AjaxObject("添加交易策略成功!");
      ajaxObject.setNavTabId("TradingStrategy_31");
      ajaxObject.setCallbackType("");//必不可少; 这句很重要
    
    //  ajaxObject.setRel("jbsxBox2trading_List");
    //  ajaxObject.setForwardUrl("http://localhost:8080/tts/stock/tradingstrategy/create_list");
      return ajaxObject.toString();
    
    服务器端返回代码
    
    {“statusCode”:”200″,”message”:”添加交易策略成功”,
    “callbackType”:”closeCurrent”,”forwardUrl”:”",“navTabId”:”TradingStrategy_31”}

     上述转自网络,下面有一种我发现的更简单的方法,只需要一句代码即可:

    location.reload();
  • 相关阅读:
    基于fpga uart学习笔记
    sublime text3 verilog代码编写高级操作篇
    做一个高尚的fpga调参侠
    彩色MT9V034摄像头 Bayer转rgb FPGA实现
    最新 Xilinx vivado IP许可申请
    基于fpga的256m的SDRAM控制器
    如何调用数据链接属性的对话框
    ASP.NET中动态生成验证码的一则方法
    为什么IIS的应用池回收设置默认为1740分钟
    使用SmtpClient发送邮件
  • 原文地址:https://www.cnblogs.com/azhqiang/p/4313121.html
Copyright © 2011-2022 走看看