Is it possible to pass the actionFunction the name of variable you want it to set in the controller? Right now I need a separate actionFunction for each field I'm setting onChange. Is it possible to make it more generic where the actionFunction receives the variable name and the variable value to set in the controller?
I don't see how this would be possible, but could it be accomplished through javascript remoting?
Best Answer
Yes, you can use apex:param(s) inside the actionFunction to send values into the controller. The value attribute can be a controller variable as shown in the docs example or set with a javascript call.
Here is something I put in use recently-
which is called from javascript with
setTableData(j$(this).val());