Auto save
No edit summary
No edit summary
Line 3: Line 3:
Sometimes one might want to provide the user with a user interaction model where the content on the page is saved automatically and thus removing 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 removing 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.


Peridic action (repeat every i.e 2000 ms),  set visible if there is dirty data  :  
Peridic action (repeat every i.e 2000 ms and set DisableExpression to 'not selfVM.IsDirty' in order to only run when something IS dirty),  set visible if there is dirty data  :  


<pre>
<pre>
Line 15: Line 15:


To hide the sidebar in order not to show the save button please see [[Layout_and_CSS]]
To hide the sidebar in order not to 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 12:26, 1 February 2023

Auto Save of 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 removing 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.

Peridic action (repeat every i.e 2000 ms and set DisableExpression to 'not selfVM.IsDirty' in order to only run when something IS dirty), set visible if there is dirty data  :

if selfVM.IsDirty  then
selfVM.Save;
  0
else
  0
endif

To hide the sidebar in order not to show the save button please see Layout_and_CSS

Also see the Tagged value on AutoSave

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