Auto save
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== Auto Save of the Page (No Save Button Needed) == | == Auto Save of the Page (No Save Button Needed) == | ||
Sometimes, one might want to provide the user with a user interaction model where the content on the page is saved automatically and thus, remove the need for a "save button" | Sometimes, one might want to provide the user with a user interaction model where the content on the page is saved automatically and thus, remove the need for a "save button". | ||
Periodic action (repeat every i.e 2000 ms and set DisableExpression to 'not selfVM.IsDirty' in order to only run when something IS dirty) is set to be visible if there is dirty data: | The easiest way to acclompish this is to use the viewmodel tagged value [[Span.Eco.AutoSave]] | ||
You can also do this "manually" if you have special needs, like this; | |||
Periodic action (repeat every i.e 2000 ms and set DisableExpression to 'not selfVM.IsDirty' in order to only run when something IS dirty) is set to be visible if there is dirty data: | |||
<pre> | <pre> | ||
Line 15: | Line 19: | ||
To hide the sidebar to not show the save button, please see [[Layout_and_CSS]]. | To hide the sidebar to not show the save button, please see [[Layout_and_CSS]]. | ||
[[Category:View Model]] | [[Category:View Model]] | ||
[[Category:Tagged Values]] | [[Category:Tagged Values]] |
Revision as of 20:16, 18 June 2023
Auto Save of the Page (No Save Button Needed)
Sometimes, one might want to provide the user with a user interaction model where the content on the page is saved automatically and thus, remove the need for a "save button".
The easiest way to acclompish this is to use the viewmodel tagged value Span.Eco.AutoSave
You can also do this "manually" if you have special needs, like this;
Periodic action (repeat every i.e 2000 ms and set DisableExpression to 'not selfVM.IsDirty' in order to only run when something IS dirty) is set to be visible if there is dirty data:
if selfVM.IsDirty then selfVM.Save; 0 else 0 endif
To hide the sidebar to not show the save button, please see Layout_and_CSS.
This page was edited more than 8 months ago on 05/05/2024. What links here