Per viewmodel ReadOnly mode
No edit summary
No edit summary
Line 15: Line 15:
# A way to set global readonly mode for the whole application
# A way to set global readonly mode for the whole application
## Once the global readonly is in effect you can skip for certain ViewModels by setting taggedvalue SysReadOnlyModeSkip=true on ViewModel
## Once the global readonly is in effect you can skip for certain ViewModels by setting taggedvalue SysReadOnlyModeSkip=true on ViewModel
## To turn on global readonly set SysMDrivenMiscSettingsSingleton.GlobalReadOnlyMode = true
## To turn on global readonly set [[SysMDrivenMiscSettingsSingleton]].GlobalReadOnlyMode = true

Revision as of 15:12, 9 February 2024

Some systems want to make use of distinction between opening a page for viewing - and intending to edit the data within.

The reasons for this may be many but one that was top of mind during our design is that we have inexperienced users that are afraid to touch or update things they do not intend to update. These users can be made to feel safer if there is a switch on the page you need to flip in order to edit anything.

Of course users still want to search and navigate the system - so the readonly logic should function much like AccessGroup ViewEnable expression - that only locks down actions and controls that actually change persistent data.

Resources and abilities available now for a framework backed per page readonly model:

  1. vSysReadOnlyMode:Boolean : a Special ViewModel variable will be detected and applied
    1. When seen it will be "or"ed into the ViewModel.ExternalReadOnlyExpression - sharing this expression with any AccessGroups.ViewEnableExpressions.
  2. WillEffectPersistedDataOverrideValue : a tagged value to be applied to columns and actions that you want to exempt from the automatic expression deduction if it changes persistent data or not.
  3. vSysReadOnlyMode is set to true on open of View
  4. : vSysReadOnlyMode is set reset from false to true after save and after cancel
  5. A special button placed along Save/Cancel called Lock/Unlock that toggles vSysReadOnlyMode
  6. A way to set global readonly mode for the whole application
    1. Once the global readonly is in effect you can skip for certain ViewModels by setting taggedvalue SysReadOnlyModeSkip=true on ViewModel
    2. To turn on global readonly set SysMDrivenMiscSettingsSingleton.GlobalReadOnlyMode = true
This page was edited 44 days ago on 03/14/2024. What links here