Link on server side pagination is not working

Link on server side pagination is not working

kaviyakaviya Posts: 3Questions: 1Answers: 0

Hi All,

I have implemented the pagination in my jsp. It displlays the correct number of records (10 of 100 records). I tried to implement a logic where if i click (coded 'a href' tag) on the first column in the table, it should navigate us to a second page. This href tag works perfectly fine for the first 10 records. When i click on next and move to the remaining 11 to 100 records, it wouldnt navigate to the next page (a href tag is not working in this case). Please help me to find out how to resolve this?.

My finding is that it accepts somewhere the _iDisplayLength": 10 to be the default value for this. Please correct me if i am wrong. Appreciate your help and time. Thanks.

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Why don't you just use DataTables' built-in pagination?

  • kaviyakaviya Posts: 3Questions: 1Answers: 0

    Hi tangerine. Thank you for your reply. I am using the pagination of datatables. It is working perfectly fine. I have implemented a logic where when i click on a data row, it should navigate to next form.

    The problem is, (I have my default display length in the show '10' entries to be defaulted to 10). So for the first 10 records my logic works fine. When i click on next button and navigate to the remaining paginated records and click on any data row, my logic is not working.

    Can you please share in your thoughts or take me to any tutorial on this?

    I just encountered one more problem now. "Showing 1 to 10 of 100 entries" is not getting displayed. I am using the following code.
    $(document).ready(function(){
    $('#detailstable').dataTable({
    "bFilter": false,
    "bInfo": false,
    "bAutoWidth": false,
    "bSortClasses": false,
    "displayLength":10,
    "oLanguage": {
    "sInfo": "Showing START to END of TOTAL entries",
    "sZeroRecords": "No data to show"
    },
    "sDom": 'T<"clear">lfrtip'
    });
    });

    Any idea on this?

This discussion has been closed.