What Application Actions Do
Application Actions allows functionality to be added to Applications in a flexible manner without needing to edit core source code files. Actions typically define what page content is presented in a given situation and can load nested actions for further processing of data.
Actions are loaded through the page request in the following manner:
This initializes the Shop Site, loads the Account Application, and executes the AddressBook Action. The files executed as part of this page request are located in:
The AddressBook Action only presents the address book page to the customer and contains no data processing logic whatsoever. As the address book should provide functionality to create, edit, and delete address book entries, these operations are properly handled through nested Actions in the following manner:
index.php?Shop&Account&AddressBook&Create index.php?Shop&Account&AddressBook&Create&Process index.php?Shop&Account&AddressBook&Edit=1 index.php?Shop&Account&AddressBook&Edit=1&Process index.php?Shop&Account&AddressBook&Delete=1 index.php?Shop&Account&AddressBook&Delete=1&Process
The files executed as part of these page requests are located in (from the Shop Site directory):
Create and Process Actions
Edit and Process Actions
Delete and Process Actions
Security And Protection
All Actions in the page request are executed in order. This allows control logic to be defined in the main Action class and affects nested Actions as they are executed. An example is having a customer log-in check in the main Action class and not needing to perform the same check in the nested Actions.
As the dynamic nature of Actions allows great flexibility and ease in adding features and functions to a Sites Application, the order of Actions executed as defined in the page request is halted as soon as an Action does not exist or if the name of the Action is the same as the Session name.
Nested Actions also take priority over parameters in the page request that share the same name.
For example, product information pages are loaded in the following manner with the product keyword:
The Products Application has the following Actions which therefore cannot be used as product keywords:
Feedback to this blog entry can be posted on the following topic in the community support forums: