adapt datatable jquery for jee application

adapt datatable jquery for jee application

dontidonti Posts: 2Questions: 0Answers: 0
edited August 2012 in General
I want to adapt this datatable: http://www.datatables.net/release-datatables/examples/server_side/row_details.html for use in my application jee

I spent a lot of time researching how to use it but always without result I managed to adapt this one: http://www.datatables.net/release-datatables/examples/basic_init/table_sorting.html the table but I have not succeeded expandable can you point me to a tutorial or clear me how

thank you very much

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    http://datatables.net/blog/Drill-down_rows

    Allan
  • dontidonti Posts: 2Questions: 0Answers: 0
    thank you allan
    but I want to use server to fill the datatable and also call a method from java class when press button open_detail
    there is the datatable that I managed to create :

    [code]<?xml version="1.0" encoding="UTF-8"?>
    <!--
    To change this template, choose Tools | Templates
    and open the template in the editor.
    -->
    <!DOCTYPE html>


    DataTables






    @import "media/css/demo_table_jui.css";
    @import "media/themes/smoothness/jquery-ui-1.8.4.custom.css";



    *{
    font-family: arial;
    }





    $(document).ready(function(){
    $('#datatables').dataTable({
    "sPaginationType":"full_numbers",
    "aaSorting":[[2, "desc"]],
    "bJQueryUI":true,
    "oLanguage": {
    "sProcessing": "Chargement...",
    "sLengthMenu": "Afficher _MENU_ Enregistrements",
    "sZeroRecords": "Aucun élément à afficher",
    "sInfo": "Page _START_ a _END_ sur _TOTAL_ enregistrements",
    "sInfoEmpty": "Page 0 de 0 sur 0 entries",
    "sInfoFiltered": "(filtrer sur _MAX_ total enregistrements)",
    "sInfoPostFix": "",
    "sSearch": "Recherche:",
    "sUrl": "",
    "oPaginate": {
    "sFirst": "Premier",
    "sPrevious": "Precedent",
    "sNext": "Suivant",
    "sLast": "Dernier"
    }
    }

    });
    })









    ID
    Date envoi
    Date livraison
    etat





    #{comm.id}
    #{comm.dateEnvoi}
    #{comm.dateLivraisonRecommande}
    #{comm.etat}







    [/code]

    can you suggest me what I should add and update to have expandable datatable

    thank you very much
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    The basic idea is that you would need to make an Ajax call to the server to get the data to display in the 'open' row, before calling fnOpen - and then in the Ajax's success handler you would call fnOpen with the data would want to display.

    Allan
This discussion has been closed.