You need to sign in to do that
Don't have an account?
Chidanand M
actionFunction and remote action
Hey Guys,
Can anyone explain me when do we use actionFunction over remote action and vice-versa with an example Code.
TIA
Can anyone explain me when do we use actionFunction over remote action and vice-versa with an example Code.
TIA
@RemoteAction is an Apex annotation used to mark a method as being available for javascript remoting. This allows you to call the method from javascript yourself and retrieve the result as a javascript object for manipulation, as per the example in the documentation. They are static and global, and hence don't have access to your current controller variables and methods.
<apex:actionFunction> is a Visualforce tag which has been around longer than remoting and allows you to invoke a controller action from javascript; it doesn't let you get retrieve data but you can rerender the page or a specific section of the page to update it with new values from the controller instance.
Please mark this as the best answer if this helps