+ Start a Discussion
rama krishna 181rama krishna 181 

3. what is action function & action support..?

3. what is action function & action support..?
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Rama Krishna,

1. Action function can call the controller method from javascript.
2. Action support adds AJAX support to another visual force component and then call the controller method. 
    for example:
<apex:outputpanel id="outptpnl">
             <apex:outputText value="click here"/>
         <apex:actionSupport event="onclick" action="{!controllerMethodName}"  rerender="pgblck" />

Here action support adds AJAX to output panel, so once you click on output panel controller method will be called.
3. Action function cannot add AJAX support to another component. But from a particular component which has AJAX support(onclick, onblur etc) action function can be called to call the controller method.
<apex:actionFunction name="myactionfun"  action="{!actionFunMethod}" reRender="outptText"/>
 <apex:inputcheckbox onclick="myactionfun" />

please refer the below link for reference. Hope it helps.

Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.

Rahul Kumar