【发布时间】:2017-01-30 10:04:50
【问题描述】:
您好,当我单击全选(超链接)选项或我希望特定页面中的特定记录(使用复选框)到服务器类时,我试图在 jquery 数据表中发送所有记录,但问题是当我单击表单提交按钮时即导出 PDF 仅获取当前页面的记录,即使在 jquery 数据表分页中的其他页面中选择了记录
为什么jquery数据表不同页面中选中的记录没有发送到java类
https://jsfiddle.net/4n5o3r3e/
<s:form id="downloadStudentDetailsForm" action="downloadStudentDetails" theme="css_xhtml" cssClass="form-horizontal">
<div class="dataTable_wrapper">
<table width="100%" class="table table-striped table-bordered table-hover" id="dataTS">
<thead>
<tr>
<th><a href="#" id="bas">Select all</a></th>
<th>Student Name</th>
<th>Parent Phone</th>
<th>Parent Email</th>
<th>ReferenceID</th>
</tr>
</thead>
<tbody>
<s:iterator value="studentRecords">
<tr>
<td><s:checkbox name="students" cssClass="case chkPassport" fieldValue="%{studentname+' '+phone+' '+email+' '+ref}" /></td>
<td><s:property value="studentname" /></td>
<td><s:property value="phone" /></td>
<td><s:property value="email"></td>
<td><s:property value="ref" /></td>
</tr>
</s:iterator>
</tbody>
</table>
</div>
<div class="col-xs-1 ">
<s:submit cssClass="btn btn-success" value="Export to Excel" id="exl" action="downloadStudentsListINExcel" />
</div>
<div class="col-xs-3 ">
<s:submit cssClass="btn btn-danger" value="Export to PDF" id="pdf" action="downloadStudentsListInPDF" />
</div> </s:form>
【问题讨论】:
-
你能指定程序的期望行为是什么吗?请编辑第一段,因为无法理解您的意思。
标签: jquery datatable datatables struts2-jquery