i am using data table to show the customer records on jsp page where i show customer name,last name,department,joining date in data table.
i have one more column which is select box. now user can user select any number of customer records from ui and send to action on server side for update. In my
jquery function i get the selected rows in data table. But i am not able to figure out how to send the these rows to action method?
what i am expecting is i send these rows from ajax to action method which has one method parameter as list(representing the selected rows) and i can extract field values from each row in list representing selected rows from UI.
But i am unsure what will be type of object that list will contain?Can someone point me in right direction with some brief example ?
i am using data table to show the customer records on jsp page where
Share
Why dont you give a checkbox in each row whose value will be the id of the corresponding record
Then when you submit get the selected ids
you can now pass
selectedRecto the action as a string variable. In your action you can split this string as arrayThen in the loop you can get each id as follows