Action components allow the page to invoke a method on the controller. The controller method typically performs some operation on the contents of the page, such as updating the database, and then either refreshes the page or navigates to a new page.
Before any refreshing or navigation takes place, the state of the user interface input elements on the page is injected into the variables of the controller using setters. This way, they are accessible from within your action code.
The two basic action components are
commandButton is rendered as an HTML button, whereas the
commandLink is rendered as an anchor. Both are valid only inside a
form component. They are typically used with an
action attribute ...