dwz 刷新當前navtab

list.jsp   其navtabId爲TradingStrategy_31;web

<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="width: 100px;">股票代碼:</label>
     <input type="text" name="code"/>
    </li> 
    <li>
     <label style="width: 100px;">起始日:</label>
     <input type="text" name="startDay"/>
    </li>
    <li>
     <label style="width: 100px;">結束日:</label>
     <input type="text" name="endDay"/>
    </li>                
   </ul>
    </div>
</form>ajax

<div class="pageContent" layoutH="160">spring

 <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 服務器端代碼mvc

AjaxObject ajaxObject = new AjaxObject("添加交易策略成功!");
  ajaxObject.setNavTabId("TradingStrategy_31");
  ajaxObject.setCallbackType("");//必不可少; 這句很重要jsp

//  ajaxObject.setRel("jbsxBox2trading_List");
//  ajaxObject.setForwardUrl("http://localhost:8080/tts/stock/tradingstrategy/create_list");
  return ajaxObject.toString();post

服務器端返回代碼ui

{「statusCode」:」200″,」message」:」添加交易策略成功」,
「callbackType」:」closeCurrent」,」forwardUrl」:」",「navTabId」:」TradingStrategy_31」}this

相關文章
相關標籤/搜索