You can use the Actions and ViewModels overview in MDriven Designer to see which actions bring up each ViewModel, making it easier to review and maintain navigation as your model grows.
A ViewModel is the model-defined view of data and UI behavior that MDriven uses to present a screen. An action can bring up a ViewModel, so a growing application can quickly accumulate navigation paths that are difficult to track from individual editors.
The Actions and ViewModels overview brings these two sides together:
- It lists the ViewModels available in the model.
- For each ViewModel, it shows the actions that take the user to that ViewModel.
- It gives you one place to inspect how screens are connected, instead of opening actions and ViewModels one at a time.
Use it when you are adding a screen, reviewing an existing flow, or trying to understand why users can reach a ViewModel from an unexpected place.
- Open the Actions and ViewModels overview in MDriven Designer.
- Locate the ViewModel you want to review.
- Read the actions shown for that ViewModel to identify every navigation path into it.
- Open the relevant action or ViewModel when you need to change the navigation behavior.
- Run or refresh your prototype after changing the model so that you verify the resulting action presentation and navigation.
For example, a model may have a ViewModel named ViewAndEditRentalContract and a class action named ShowRentalContract. The overview lets you confirm that ShowRentalContract brings up that ViewModel. If additional actions also bring up the same ViewModel, the overview exposes those entry points before they become difficult to find in a larger model.
Use the overview during design
Keep the overview available while you create related screens and actions. It is especially useful when an application has several classes, relations, ViewModels, and actions that navigate between detail and search views.
A practical review cycle is:
- Create or update the ViewModel that represents the screen.
- Create or update the action that should bring up that ViewModel.
- Check the Actions and ViewModels overview to confirm the connection.
- Test the intended flow in the prototype.
- Review the action's availability in each ViewModel where its context type appears.
The overview answers which actions lead to this ViewModel? It does not replace the tools for deciding where an action is displayed?
Check action availability separately
MDriven calculates the actions shown in a view. Class actions are associated with a class and can appear wherever an object of that class is shown. ViewModel actions are defined for one ViewModel. Actions can navigate, but they can also perform work, such as calling a method on an object.
Use Training:Available Actions when you need to control whether a matching action is shown in a particular ViewModel or nesting. That page describes the ViewModel editor controls, the Action Cross Reference window, and the Actions Editor perspective.
For example, ShowRentalContract can be useful in a rental-contract search result grid, but it is usually not useful to show it again when the user is already in ViewAndEditRentalContract. Opt the action out for that ViewModel while retaining it where users need it.
Be careful with ViewModels that contain the same type in more than one place. A search ViewModel can contain a root instance and a grid nesting of RentalContract. The class action may therefore be available twice. If the root instance is always null, opt out of the action for that root context and retain it for the result-grid context.
Default action opt-out
From June 2025, matching class actions are shown by default unless you opt out. A ViewModel can use Default Opt-out when you want it to ignore matching actions unless they have been explicitly opted in. The package setting Actions - default opt-out on for new ViewModels controls the default value for new ViewModels. To convert existing ViewModels, use Extras â Convert all Viewmodels to actions default opt-out.
Turning on Default Opt-out preserves the current action set recorded in the spans file, including existing opt-ins and opt-outs. See Training:Available Actions for the complete behavior and the available editing tools.
Actions commonly navigate from a list or summary ViewModel into a more detailed ViewModel. Root object expressions determine the object context supplied when a ViewModel is brought up; this pattern is central to building useful navigation between views. For a detailed walkthrough of navigation, root object expressions, and related design patterns, see Documentation:Part 10 MDriven Designer Overview. Actions and navigation.
For the broader role of actions in the application and ViewModel architecture, see Documentation:Application actions.
