You can configure selected global MDriven Turnkey UI behaviors by adding a dedicated singleton class to your model; this page is for developers maintaining a Turnkey application in MDriven Designer.
Configure global Turnkey settings
Turnkey recognizes attributes on one specifically named singleton class:
SysMDrivenMiscSettingsSingleton
Use this class for application-wide UI behavior. These settings affect the Turnkey client and are not a replacement for access control or business rules in your model.
- In your model, add a class named
SysMDrivenMiscSettingsSingleton. - Make the class a singleton.
- Add only the recognized attributes listed on this page, with the stated type.
- Set the attributes to the required values for your application.
- Deploy or run the updated model and verify the behavior in the affected Turnkey views.
For example, to make the application read-only for all users, add the Boolean attribute GlobalReadOnlyMode and set it to true.
Recognized attributes
| Attribute | Type | What it changes | Example use |
|---|---|---|---|
GlobalReadOnlyMode
|
Boolean | Enables global read-only mode. | Set this to true when users must be able to view information without editing it.
|
GlobalToolbarMode
|
Boolean | Enables global toolbar mode. | Use this when your application is designed to present actions through the toolbar. |
GlobalHideActionOnDisable
|
Boolean | Hides actions when they are disabled, rather than showing disabled actions. | Set this to true to remove unavailable actions from the UI. For example, an action that is disabled because no row is selected is not shown.
|
LibreOfficeInstallPathAndExe
|
String | Specifies the path to the LibreOffice executable. | Set the value to C:\Program Files\LibreOffice\program\soffice.exe when Turnkey must use that installation.
|
GlobalCenteredPopUp
|
Boolean | Enables centered pop-up behavior. | Set this to true when pop-up dialogs should open centered.
|
GlobalBlazorClient
|
Boolean | Uses the Blazor client by default instead of the AngularJS client. | Set this to true only when the application is intended to use the Blazor client as its default client.
|
GlobalBlazorClientComponentOverride
|
String | Specifies a Blazor component type switch broker that can replace components based on the component holder and requested type. | Set the value in the form assemblywithoutext;ATypeThatImplementsIComponentTypeSwitchBroker. The specified type must implement IComponentTypeSwitchBroker and provide SwitchThis(IMDCompHolder compholder, Type theType).
|
GlobalNavigateOnDoubleClickWithoutMenu
|
Boolean | Changes double-click navigation behavior. Normally, navigation occurs only when one action is enabled; with this setting, Turnkey takes the first action when it is a navigation action. | Set this to true for a grid where double-click should open the first available navigation action.
|
GlobalReadOnlyModeUseSaveAndLock
|
Boolean | Adds a Save + control when global read-only mode is used. | Use this when the read-only workflow should expose the additional Save + behavior. |
GlobalModalOfferOpenStandalone
|
Boolean | Adds an option to open a modal view as a normal standalone view in a separate tab. | Set this to true if users need to continue from a modal without the modal limitations.
|
GlobalSeekersAlwaysNew
|
Boolean | Creates a new instance of a seeker form every time it opens. | Set this to true when users need to keep separate searches open. For example, one seeker can remain filtered for Customer A while another is used to find Customer B.
|
Modal and seeker behavior
A modal window does not show left-side actions. Nested modals are not supported: you cannot open a modal from another modal. If this prevents a user from completing a workflow, enable GlobalModalOfferOpenStandalone. The modal then offers an extra button that opens the same view as a standalone view in a separate tab.
A seeker is a search form. By default, reopening a seeker can reuse its existing instance, so a later search can be reflected in the first open window. Enable GlobalSeekersAlwaysNew when each open seeker must retain an independent search state.
Choose settings deliberately
These are global settings. Before enabling one, test it in the views and workflows it affects.
- Test
GlobalHideActionOnDisablewith users who need to understand why an action is unavailable. Hiding an action removes that visual explanation. - Test
GlobalNavigateOnDoubleClickWithoutMenuin lists with multiple actions. It uses the first action only when that action navigates. - Test
GlobalModalOfferOpenStandalonefor workflows that open detail views from dialogs. - Test
GlobalSeekersAlwaysNewby opening more than one seeker and confirming that each search retains its own criteria. - Treat
GlobalReadOnlyModeas a UI behavior. Continue to define permissions and data integrity rules in the model and server-side application behavior.
Client selection and component replacement
GlobalBlazorClient changes the default client from AngularJS to Blazor. If you also set GlobalBlazorClientComponentOverride, ensure that the configured type follows the required assembly-and-type format and implements IComponentTypeSwitchBroker. Test component replacement in every view that uses the affected component type.
For an overview of how the Turnkey client, web application, MDrivenServer, and database work together, see MDriven Turnkey Architecture. For local client development and debugging, see Documentation:Turnkey local development tips and HowTos:Debug Turnkey Generic Code.
