Global actions
No edit summary
Line 1: Line 1:
[[Category:The MDriven Book]]
[[Category:The MDriven Book]]
[[Category:Actions]]
[[Category:Actions]]
Main menu actions are called GlobalActions. We start by bringing up the Actions definition window:
Global actions. Open the global actions window by clicking on the gears on the parameter designer. As you see this view you can click on the actions there's a left for add global action. To the right, you see the current main menu. Global actions are what builds the main menu. There are standard actions.  Exit refresh, say redo, and undo. Exit isn't used usually in a web application but is used in a Windows application to quit the application.  If you delete or you don't see the standard actions, say we delete exit.  You can click on ensure standard actions and these five actions will be added. Exit application not used in web. Refresh reloads data. From the database usually not used in a web application either.  Save the current changes. Reduce what has been undone in multiple steps.  Undo what has been changed in multiple steps.  Beware that this window can be made small and hide buttons.  Keep the actions windows big enough to see the ensure standard actions and delete button for an action. When you click on an action you see the settings for that action to the right. You have the action name. You have a code comment. If you want to have a comment on this action both here and in the code. If code is generated for your model. The name expression says when this button should be...  Now let's skip these settings in this global action and we instead link to the general settings.
 
[[File:Main Menu actions image 1.png|frameless|link=https://wiki.mdriven.net/index.php/File:Main_Menu_actions_image_1.png]]
 
We add some GlobalActions and give them names based on what we want them to do in the end:
 
[[File:Main Menu actions image 2.png|frameless|link=https://wiki.mdriven.net/index.php/File:Main_Menu_actions_image_2.png]]
 
If I run this as is with MDriven prototyping, I get this main menu:
 
[[File:Main Menu actions image 3.png|frameless|link=https://wiki.mdriven.net/index.php/File:Main_Menu_actions_image_3.png]]
 
But we want to organize the menu, so we create some Menu-Groups:
 
[[File:Main Menu actions image 4.png|frameless|link=https://wiki.mdriven.net/index.php/File:Main_Menu_actions_image_4.png]]
 
[[File:Main Menu actions image 5.png|frameless|link=https://wiki.mdriven.net/index.php/File:Main_Menu_actions_image_5.png]]
 
Now, I can decide in what group my actions should be:
 
[[File:Main Menu actions image 6.png|frameless|link=https://wiki.mdriven.net/index.php/File:Main_Menu_actions_image_6.png]]
 
then I get this result when prototyping:
 
[[File:Main Menu actions image 7.png|frameless|link=https://wiki.mdriven.net/index.php/File:Main_Menu_actions_image_7.png]]
 
To get the internal order and dividers into the menu, I need to set the Divider group for the items. If this differs between two actions, they will be separated by a divider. If it is the same between two actions, the actions will be sorted on the “Sort order in Group” value within the group.[[File:Main Menu actions image 8.png|none|thumb|link=https://wiki.mdriven.net/index.php/File:Main_Menu_actions_image_8.png]]This is what I get in prototyping now:
 
[[File:Main Menu actions image 9.png|frameless|link=https://wiki.mdriven.net/index.php/File:Main_Menu_actions_image_9.png]]
 
If I want to organize the actions in sub-menus, I do this by declaring a new Menu group:
 
[[File:Main Menu actions image 10.png|frameless|link=https://wiki.mdriven.net/index.php/File:Main_Menu_actions_image_10.png]]
 
And I use that group on the actions I want in the submenu:
 
[[File:Main Menu actions image 11.png|frameless|link=https://wiki.mdriven.net/index.php/File:Main_Menu_actions_image_11.png]]
 
The strategy for creating context menus is exactly the same.


The MDriven Book - See: [[Action names]]
The MDriven Book - See: [[Action names]]

Revision as of 06:28, 8 August 2023

Global actions. Open the global actions window by clicking on the gears on the parameter designer. As you see this view you can click on the actions there's a left for add global action. To the right, you see the current main menu. Global actions are what builds the main menu. There are standard actions.  Exit refresh, say redo, and undo. Exit isn't used usually in a web application but is used in a Windows application to quit the application.  If you delete or you don't see the standard actions, say we delete exit.  You can click on ensure standard actions and these five actions will be added. Exit application not used in web. Refresh reloads data. From the database usually not used in a web application either.  Save the current changes. Reduce what has been undone in multiple steps.  Undo what has been changed in multiple steps.  Beware that this window can be made small and hide buttons.  Keep the actions windows big enough to see the ensure standard actions and delete button for an action. When you click on an action you see the settings for that action to the right. You have the action name. You have a code comment. If you want to have a comment on this action both here and in the code. If code is generated for your model. The name expression says when this button should be...  Now let's skip these settings in this global action and we instead link to the general settings.

The MDriven Book - See: Action names

This page was edited 10 days ago on 05/08/2024. What links here