You need to sign in to do that
Don't have an account?
dipu2
Is it possible to reference diferent controllers for Remote Actions in one VF page?
I have remote actions in two different controllers. Is it possible to invoke remote actions from two different controllers from single VF page?
You can call one function and pass parameter and then on server side using variables decide from which controller you want to call function. Call function and return value.
Or you can use multiple extensions and then call function from one extension based on parameters.
All Answers
You can call one function and pass parameter and then on server side using variables decide from which controller you want to call function. Call function and return value.
Or you can use multiple extensions and then call function from one extension based on parameters.
Thanks for the response.
My requirement is little more complex. I have about six controllers and the result of remote action has to be processed by JavaScript. My primary goal was to reduce the repeatiton of the remote function as well as JavaScript code by passing the controller name to a JavaScript function. So I had to do what you had suggested. All of the controller has the same remote functon which call a function from another class.
I just had to write processRemoteAction(RemoteController) JavaScript function that takes any controller as parameter as long as the controller has the remote function used inside the JavaScript function.