Action Components :- In our previous Salesforce Tutorial we have learned about Visualforce Data components, what are the different types of Data components. In this Salesforce Training Tutorial we are going to learn about Visualforce Action Components and how Action Components are used in Visualforce Pages.
What are Action Components in Visualforce ?
Action Components are those which allows a controller in to a visualforce page to perform various operations like inserting, updating a page, refreshing a page or navigating to new page.
How Action Components Works ?
If we have written Action component code to refresh a page or to navigate to a new visualforce page first the state of the user interface input elements on the page are injected into the variables of the controller using Setter.
When working with Action components in visualforce we mainly observe two action components they are commandbutton and commandlink.
CommandButton :- Commandbutton is used to insert Hyper markup Text Language (HTML) buttons.
CommandLink :- CommandLInk components is used to insert anchor text to links.
Note :- Both Command Button and Command LInk components are used between <apex:form> and </apex:form> tag only.
Some of the primitive components are as follows