You need to sign in to do that
Don't have an account?
srikanthpalla
Actionfunction and Actionsupport
please let me know about Actionfunction and actionsupport in VF pages
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
apex:actionFunction
A component that provides support for invoking controller action methods directly from JavaScript code using an AJAX request. An <apex:actionFunction> component must be a child of an <apex:form> component. Used when we need to perform similar action on various events. Even though you can use it in place of actionSupport as well where only event is related to only one control.
Ex:
actionFunction : provides support for invoking controller action methods directly from JavaScript code using an AJAXrequest
apex:actionSupport
A component that adds AJAX support to another component, allowing the component to be refreshed asynchronously by the server when a particular event occurs, such as a button click or mouseover.
Used when we want to perform an action on a particular event of any control like onchange of any text box or picklist.
--------------------------------------------------------------------------------------------------------------------------------------------------------
1. difference is in case of Action function we invoke AJAX using Java script while in case of Action support we may directly
invoke method from controller
2. other difference is Action function may be commonly used from different place on page while action support may only be used for particular single apex component.
All the corresponding examples you can find from below link:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_actionFunction.htm
https://success.salesforce.com/answers?id=90630000000hU2kAAE
http://sfdcsrini.blogspot.com/2014/07/visualforce-action-function-example.html
http://www.salesforcetutorial.com/actionfunction-tag/
Please do let me know if it helps you.
Regards,
Mahesh
All Answers
apex:actionFunction
A component that provides support for invoking controller action methods directly from JavaScript code using an AJAX request. An <apex:actionFunction> component must be a child of an <apex:form> component. Used when we need to perform similar action on various events. Even though you can use it in place of actionSupport as well where only event is related to only one control.
Ex:
actionFunction : provides support for invoking controller action methods directly from JavaScript code using an AJAXrequest
apex:actionSupport
A component that adds AJAX support to another component, allowing the component to be refreshed asynchronously by the server when a particular event occurs, such as a button click or mouseover.
Used when we want to perform an action on a particular event of any control like onchange of any text box or picklist.
--------------------------------------------------------------------------------------------------------------------------------------------------------
1. difference is in case of Action function we invoke AJAX using Java script while in case of Action support we may directly
invoke method from controller
2. other difference is Action function may be commonly used from different place on page while action support may only be used for particular single apex component.
All the corresponding examples you can find from below link:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_actionFunction.htm
https://success.salesforce.com/answers?id=90630000000hU2kAAE
http://sfdcsrini.blogspot.com/2014/07/visualforce-action-function-example.html
http://www.salesforcetutorial.com/actionfunction-tag/
Please do let me know if it helps you.
Regards,
Mahesh
Also go through the useful and important information from the below links:
https://developer.salesforce.com/forums/ForumsMain?id=906F0000000DCXv
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_actionSupport.htm
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_actionFunction.htm
https://developer.salesforce.com/forums/?id=906F0000000933OIAQ
https://developer.salesforce.com/forums/?id=906F0000000976QIAQ
Regards,
Mahesh
There are to many example are available in Google for same. Please check below post. I hope that will help you
1) https://developer.salesforce.com/forums/?id=906F0000000933OIAQ
2) https://developer.salesforce.com/forums/?id=906F0000000976QIAQ
3) http://www.cloudforce4u.com/2013/06/difference-between-action-support-and.html
4) http://learn4sfdc.blogspot.in/2014/01/explain-actionfunction-actionsupport.html
actionFunction : provides support for invoking controller action methods directly from JavaScript code using an AJAXrequest
Used when we need to perform similar action on varioud events. Een though you can use it in place of actionSupport as well where only event is related to only one control.
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionFunction.htm
ActionSupport : A component that adds AJAX support to another component, allowing the component to be refreshed asynchronously by theserver when a particular event occurs, such as a button click or mouseover.
Used when we want to perform an action on a perticular eventof any control like onchange of any text box or picklist.
Let us know if this will help u
Thanks
Amit Chaudhary
Here is the example for actionSupport.
https://developer.salesforce.com/forums/ForumsMain?id=906F0000000kCFoIAM
Thank You,
Sohel Mohd