Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Automatic Pagination - CDE - Table Component - CDA Data Source Query

  1. #1
    Join Date
    Oct 2015
    Posts
    5

    Default Automatic Pagination - CDE - Table Component - CDA Data Source Query

    Dear all,

    I was looking for one way to automatize the pagination of the Table Component (CDA Data Source query), that is, I need to update (between time intevals) the rows showed in one page, to the rows from the next page, automatically, without user interaction clicking on Next Page button.
    I was thinking that pagination on server-side could do this, but it is not working.
    Is there some js function to do this in datatables?

    BI-SERVER VERSION: 5.4.0.1 130

    Regards,

    Amom

  2. #2
    Join Date
    Jul 2007
    Posts
    2,498

    Default

    Why not simply use the refresh timeout ?
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  3. #3
    Join Date
    Oct 2015
    Posts
    5

    Default

    Hello Pedro,

    I need something that changes (automatically) the pages from pagination of table components.
    I'm using the refresh period to uptadate all query of the table component, which allways return to the page 1 of the table. But it doesn't change the pages from the table component.

    Thanks in advance

  4. #4
    Join Date
    Jul 2007
    Posts
    2,498

    Default

    Ok

    So check datatables.net. It's the stuff that tableComponent uses, you have apis to control that
    Pedro Alves
    Meet us on ##pentaho, a FreeNode irc channel

  5. #5
    Join Date
    Oct 2015
    Posts
    5

    Default

    Dear all,

    There is no plugin to change Table pages automatically.
    But, I got some help (from dataTable.net's forum) and insight to implement this in the dataTable plugin through the following code:


    $(document).ready( function () {
    var table = $('#example').DataTable({
    pageLength: 5
    });

    // Get the page info, so we know what the last is
    var pageInfo = table.page.info();


    // Start an interval to go to the "next" page every 3 seconds
    var interval = setInterval(function(){
    // "Next" ...
    table.page( 'next' ).draw( 'page' );

    // If were on the last page, clear the interval
    if ( table.page()+1 === pageInfo.end ) // +1 the current page, since it starts at 0
    clearInterval(interval);

    }, 3000); // 3 seconds
    } );



    However, how could I implement this code into table component?
    I tried add a layout resource referencing the id selector from the component and within postExecution also.

    Surely, I'm implementing the code in a wrong way.

    Someone could help me in this issue?

    Thanks in advance!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.