+ Start a Discussion
Gaurav AgnihotriGaurav Agnihotri 

Apex:actionsupport

Hi 
I am trying to understand the actionsupport tag used in visualforce page. The classic defination is that it is a component that add support to another component that refreshed asynchonously when a particular event occurs.

Is it safe to assume that it is responsible to trigger controller actions in response to DOM element events.

why would i not use apex:commandButton instead? what is different?
Best Answer chosen by Gaurav Agnihotri
Amit Chaudhary 8Amit Chaudhary 8
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

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_charting_refreshing_data_actionsupport.htm

NOTE:- It allows components to be refreshed asynchronously by calling the controller’s method when any event occurs (like click on button). It allows us to do partial page refresh asynchronously without refreshing  full page.

But in apex:commandButton  full page will refreshed.

let us know if this will help you
 

All Answers

Amit Chaudhary 8Amit Chaudhary 8
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

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_charting_refreshing_data_actionsupport.htm

NOTE:- It allows components to be refreshed asynchronously by calling the controller’s method when any event occurs (like click on button). It allows us to do partial page refresh asynchronously without refreshing  full page.

But in apex:commandButton  full page will refreshed.

let us know if this will help you
 
This was selected as the best answer
Gaurav AgnihotriGaurav Agnihotri
Thanks Amit.
Appreicate your help.