You can restore the built-in Save, Cancel, Refresh, Undo, Redo, and Exit commands from the Global actions window when your application needs the standard application-level actions.
What standard actions are
Standard actions are global actions that invoke framework behavior rather than business-specific logic. Global actions build the application's main menu and are available independently of a particular object or ViewModel context.
For example, a user editing an object can select Save to keep the current changes, or Undo to reverse recent changes before saving.
Restore the standard actions
Use Ensure Std Actions when standard actions have been deleted or are absent from the model.
- In MDriven Designer, open the Global actions window by selecting the gears icon.
- Locate the Ensure Std Actions button.
- Select Ensure Std Actions.
- If MDriven Designer reports that actions already exist and asks whether to create the standard actions, confirm the operation if you want the standard actions added.
- Review the action list and the current main-menu layout on the right.
Keep the Global actions window large enough to show both Ensure Std Actions and the delete control. A small window can hide these controls.
Standard action behavior
| Action | What it does | Example |
|---|---|---|
| Save | Saves the changes in the current view. | After changing a customer's address, the user selects Save to keep the change. |
| Cancel | Cancels changes in the current view. | After entering an incorrect address, the user selects Cancel instead of saving it. |
| Refresh | Refreshes data from the server. When the application uses persistence, this re-reads database changes made since the data was read into the view. | A user refreshes a list to see records changed by another user. |
| Undo | Reverses changes made in the current view. It can undo multiple steps. | A user changes two fields and uses Undo to reverse the latest change. |
| Redo | Reapplies changes that were reversed with Undo. It can redo multiple steps. | After using Undo, a user selects Redo to restore the reversed change. It has no effect when no change has been undone. |
| Exit | Attempts to exit the application when the execution environment supports it. | In a Windows application such as WPF, a user selects Exit to quit. It is normally not relevant in a web application. |
Global actions build the main menu. After restoring the actions, review their menu placement so users can find them in appropriate groups.
For example, you can place Save and Cancel with editing commands, and place Undo and Redo together. The supplied walkthrough shows standard actions grouped into menus such as File and Edit, and demonstrates assigning shortcut keys to Undo and Redo. For guidance on organizing and opting out of actions, see Opting out actions.
Do not use a global action when the command requires the current ViewModel or a selected object. Use ViewModel actions for commands that require ViewModel context, or class actions for commands available where a class is known to the user interface. See Documentation:Actions for the action types and execution contexts.
Missing Save action in a web application
If a web application does not show Save, check that the standard actions exist in the model.
- Open the Global actions window from the gears icon in MDriven Designer.
- Select Ensure Std Actions to add missing standard actions.
- Confirm that both Save and Cancel are present in the global-action list.
- Review the main-menu layout and action opt-in configuration to ensure the actions are available to the user.
Gotcha: Exit and Refresh are usually not used in web applications. Their presence does not mean that a browser can close the application or that every application needs to expose refresh in its menu.
