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