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". This behaviour might be achieved by creating a periodic action that will save the page if it contains dirty data.
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]].
Also, see the [[MDrivenDesignerTaggedValueHints|Tagged value on AutoSave.]]
[[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 84 days ago on 02/10/2024. What links here