2
뭔가 잘못하고있을 것입니다.하지만 코드는 매우 기본적인 것으로 웹에서의 예에서 벗어나지 않습니다.Datatables에서 페이지 변경 내용을 처리하지 않습니다.
서버 측 페이징을 사용하고 있는데, 즉각적인 페이지로드시 서버에서 데이터를 가져 와서 테이블을 올바르게 렌더링한다는 것입니다. 그러나 페이징, 또는 페이지의 레코드 수를 변경하면 AJAX 호출을 수행하지만 실제로 처리하지 못합니다.
jquery.dataTables.js (v 1.8.2)의 3562 행을 변경하면 문제가 중지됩니다.
if (false)//json.sEcho*1 < oSettings.iDraw)
그 라인에 대한 몇 가지 상황 :
<script type="text/javascript">
$(function(){
$('#recTable').dataTable({
"bProcessing":true,
"bServerSide": true,
"sAjaxSource": "/recordings/partPageCallRecordings/",
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"aoColumns": [
{ "bSortable": false },
null,
null,
null,
{ "bSortable": false }
]
});
});
</script>
과 HTML :
이<table id='recTable' class='vmTable' >
<thead>
<tr class='vmHeader'>
<th><input id='selectAll' type='checkbox'></input></th>
<th class='sortHead'>Date</th>
<th class='sortHead'>File Name</th>
<th class='sortHead'>Type</th>
<th class='sortHead'>Playback</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
내 경험에 비추어 볼 때 서버의 해당 데이터와 상호 작용하는 적절한 방법은 요청 매개 변수에서 가져온 다음 수정하지 않고 그대로 응답에서 다시 전송하는 것입니다. –
감사합니다. 나는 내 응답의 일부가 하드 코딩 된 사실을 어떻게 간과했는지 모른다. – andyortlieb