Skip to main content
deleted 125 characters in body
Source Link
mauriD
  • 163
  • 1
  • 12

I am using the datatables.net[datatables.net][1] jQuery plugin with an <apex:datatable /> and I want to submit all records checked from the javascript array[],dataTable meaning i'm using

listaInnerProduct is a list of Wrapper Class which has a boolean attr isSelected.

I have the following problem:

When-If i toggle between the pages "next page" anddo check others records in the table only submit the records that were checked in the last page records displayed. I mean, the table shows up 10 records you checked 4on some Rows and do click in next pagethen go to Next Page button, other 10 records will be displayed and then check 2 more and SubmitClick on my commandButton. Only. the last two recordsprevious values are "selected" innot sending to the wrapp Classserver. Only the current page.

I want to submit all javascript List so iMy question is: How could save alli send an array of ObjectHTMLRowElement (which ones i got it from the selected records. Any ideadataTable()) from the visualforce page to handle thisthe controller and parse it to sObject?

I am using the datatables.net jQuery plugin with an <apex:datatable /> and I want to submit all records from the javascript array[], meaning i'm using

listaInnerProduct is a list of Wrapper Class which has a boolean attr isSelected.

When i toggle between the pages "next page" and check others records in the table only submit the records that were checked in the last page records displayed. I mean, the table shows up 10 records you checked 4 and do click in next page, other 10 records will be displayed and then check 2 more and Submit. Only the last two records are "selected" in the wrapp Class.

I want to submit all javascript List so i could save all the selected records. Any idea to handle this?

I am using the [datatables.net][1] jQuery plugin with an <apex:datatable /> and I want to submit all records checked from the dataTable meaning i'm using

I have the following problem:

-If i do check on some Rows and then go to Next Page button, and then Click on my commandButton.. the previous values are not sending to the server. Only the current page.

My question is: How could i send an array of ObjectHTMLRowElement (which ones i got it from the dataTable()) from the visualforce page to the controller and parse it to sObject?

added 4 characters in body
Source Link
mauriD
  • 163
  • 1
  • 12

Here is the Code to initialize dataTable Jquery:

 jQuery(document).ready(function(){
    $('table[id$="itemsList"]').dataTable();
                    
    // Check / uncheck all available rows at once.
        jQuery('#selectAll').click( function(){             
            if(jQuery(this).is(':checked')){
                jQuery('.chkProd').attr('checked', true);               
            }else{
                jQuery('.chkProd').attr('checked', false);
            }
           });
 });

in my VisualForce Page. And i have the follow environment, which has "10","50","100" options records to display:

Here is the Code to initialize dataTable Jquery:

 jQuery(document).ready(function(){
    $('table[id$="itemsList"]').dataTable();
                    
    // Check / uncheck all available rows at once.
        jQuery('#selectAll').click( function(){             
            if(jQuery(this).is(':checked')){
                jQuery('.chkProd').attr('checked', true);               
            }else{
                jQuery('.chkProd').attr('checked', false);
            }
           });
 });

in my VisualForce Page. And i have the follow environment, which has "10","50","100" options records to display:

Here is the Code to initialize dataTable Jquery:

 jQuery(document).ready(function(){
    $('table[id$="itemsList"]').dataTable();
                    
    // Check / uncheck all available rows at once.
        jQuery('#selectAll').click( function(){             
            if(jQuery(this).is(':checked')){
                jQuery('.chkProd').attr('checked', true);               
            }else{
                jQuery('.chkProd').attr('checked', false);
            }
           });
 });

Here is the Code to initialize dataTable Jquery:

 jQuery(document).ready(function(){
    $('table[id$="itemsList"]').dataTable();
                    
    // Check / uncheck all available rows at once.
        jQuery('#selectAll').click( function(){             
            if(jQuery(this).is(':checked')){
                jQuery('.chkProd').attr('checked', true);               
            }else{
                jQuery('.chkProd').attr('checked', false);
            }
           });
 });

in my VisualForce Page. And i have the follow environment, which has "10","50","100" options records to display:

added 503 characters in body
Source Link
mauriD
  • 163
  • 1
  • 12

Here is the Code to initialize dataTable Jquery:

 jQuery(document).ready(function(){
    $('table[id$="itemsList"]').dataTable();
                    
    // Check / uncheck all available rows at once.
        jQuery('#selectAll').click( function(){             
            if(jQuery(this).is(':checked')){
                jQuery('.chkProd').attr('checked', true);               
            }else{
                jQuery('.chkProd').attr('checked', false);
            }
           });
 });

Here is the Code to initialize dataTable Jquery:

 jQuery(document).ready(function(){
    $('table[id$="itemsList"]').dataTable();
                    
    // Check / uncheck all available rows at once.
        jQuery('#selectAll').click( function(){             
            if(jQuery(this).is(':checked')){
                jQuery('.chkProd').attr('checked', true);               
            }else{
                jQuery('.chkProd').attr('checked', false);
            }
           });
 });
added tag and clarified the usage of the datatables.net plugin
Source Link
Mark Pond
  • 23.1k
  • 2
  • 60
  • 104
Loading
added 760 characters in body
Source Link
mauriD
  • 163
  • 1
  • 12
Loading
added 95 characters in body
Source Link
mauriD
  • 163
  • 1
  • 12
Loading
added 95 characters in body
Source Link
mauriD
  • 163
  • 1
  • 12
Loading
Source Link
mauriD
  • 163
  • 1
  • 12
Loading