Salesforce Implementation

Salesforce Implementation

jamessteelforthjamessteelforth Posts: 17Questions: 4Answers: 0
edited June 2013 in General
Now i have successfully implemented Datatables on my VF page(Hurraay!! DT rocks!!) . But i am faced with a slight problem. The table initialisation says - document('tableID').ready i.e apply datatables' features to the HTMl table whenever page is loaded. But in salesforce we have a very neat option of re-rendering just a part of a page negating the need to reload the page in every scenario. My issue is whenever i simply re-render the table instead of re-loading the page, my table features/jquery ui goes for a toss and all that remains behind is lame HTML table. How can i overcome this? I want datatable features to be applied even when i simply re-render the table and dont re-load the whole page

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    I presume there is a callback for when the new content is loaded. Can you not just initialise DataTables at that point?

    Allan
  • jamessteelforthjamessteelforth Posts: 17Questions: 4Answers: 0
    yeah, thanks for advice.
    For those who are from SF background - I have my apex function call in the "action" attribute of the . This is resposible for calling the apex fucntion and getting the result set for my page to display. In addition to this i am calling a javascript function in the "oncomplete" attribute of the . The javascript fn has the code to intialise datatables.

    Oncomplete means that the javascript fn will be called only after completion of the action function. i.e. the datatable features will be applied only after the resultset is procured, which is the exact sequence we want.
This discussion has been closed.