Integrate Datatables on Oracle Apex 20

Integrate Datatables on Oracle Apex 20

Gon91Gon91 Posts: 8Questions: 0Answers: 0

Hi,

I'm performing an integration with the Datatables API, all work fine but now i get a problem when i want to submit the page through a button. I get this error:

--> ERR-1002 Unable to find item ID for item "example_length" in application "110"

Basically i have a select list with 2 values, that dependent of the value the table changes. What is curious is that with button don t work but if i change the value of the select list and click on the "refresh page" of the browser all work fine.

Someone know what is happening?

The example is the id of the table.

Thank you.

Replies

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

    That's an Oracle Apex error, not DataTables. Have you tried StackOverflow?

  • Gon91Gon91 Posts: 8Questions: 0Answers: 0

    Yes i know, but could had happened to someone in here idk. I tryed the apex community also.

    It's strange because mention always the id of the table plus "_length"

    Thanks.

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

    I think we might need to see your code. Can you provide a link to your page?

  • Gon91Gon91 Posts: 8Questions: 0Answers: 0
    edited February 2021

    unfortunatly i can't because it's inside the network and the link don t work, only through vpn.

    Basically i invoque this on a region of an Apex page:

      htp.p( '`<table id="example" class="display" style="width:100%">`');
        
       DYNAMIC_TABLE_CHART.TABLE_REPORT_QUERY_final(:p4_reportid, :p4_modo, v_start_date, v_var_list);
    
       htp.p('`</table>`');
    

    This function only construct the table and work fine.

    In the page i also have a select list with 2 attributes related to the :p4_modo, when i select one and click on the submit button that error appears but if i select one of the attributes and click on the refresh of the browser the table change correctly.

    i already searched in some foruns includind stackoverflow and tryed a lot of things but nothing worked.

    The select list include this values:

    Display: 15M   24H
    Return:  15M   24H
    

    Thank you.

  • Gon91Gon91 Posts: 8Questions: 0Answers: 0
    edited February 2021

    .

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    i get a problem when i want to submit the page through a button

    We need to understand this better - is this using Editor, or some other approach? And can you link to your page so we can take a look, please?

    Colin

  • Gon91Gon91 Posts: 8Questions: 0Answers: 0

    unfortunatly i can't because it's inside the network and the link don t work, only through vpn.

    I'm using this:
    https://datatables.net/examples/data_sources/dom

    But the data within the html is filled through dynamic SQL.

    The button is a simple apex buton that submit the page.

    Further we pretend to develop more the tables and use the editor.

    Thank you

  • Gon91Gon91 Posts: 8Questions: 0Answers: 0

    I guess this can tell you something. We don't use json to populate the table.

    We build a dynamic sql function to execute a query and save it in a collection.

    Then we loop the collection and build the table with that.

    Could this be related?

  • allanallan Posts: 63,214Questions: 1Answers: 10,415 Site admin

    example_length would be the id of the drop down for the page length selector (since your DataTable has an id of example). Why Apex would care about that or do anything with it - I have absolutely no idea I'm afraid. As @tangerine said, you'd need to ask Oracle support.

    Allan

  • Gon91Gon91 Posts: 8Questions: 0Answers: 0
    edited February 2021

    I found what happened, if i add the value false to the paging all work:

    `$(document).ready(function() {
    $('#example').DataTable({

     paging: false
    
    });
    

    } );`

    Probably a bug of apex. Anyone ever experience this?

    Thank you

  • Gon91Gon91 Posts: 8Questions: 0Answers: 0

    I will question them.

    Thank you

This discussion has been closed.