Newer Version Available
Action Class
You can use ApexPages.Action to create an action method that you can use in a Visualforce custom controller or controller extension.
Namespace
ApexPages
Usage
For example, you could create a saveOver method on a controller extension that performs a custom save.
Instantiation
The following code snippet
illustrates how to instantiate a new ApexPages.Action object that uses the save action:
Example
In the following example, when the user updates or creates a new Account and clicks the Save button, in addition to the account being updated or created, the system writes a message to the system debug log. This example extends the standard controller for Account.
The following is
the controller extension.
The following is the Visualforce markup for a page that uses the above controller extension.
For information
on the debug log, see “View Debug Logs” in the Salesforce online help.