Auto save
No edit summary
(Automatically adding template at the end of the page.)
(2 intermediate revisions by 2 users not shown)
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".  


The easiest way to acclompish this is to use the viewmodel tagged value [[Span.Eco.AutoSave]]
The easiest way to accomplish this is to use the ViewModel tagged value, [[Span.Eco.AutoSave]]


You can also do this "manually" if you have special needs, like this;
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:
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 21: Line 21:
[[Category:View Model]]
[[Category:View Model]]
[[Category:Tagged Values]]
[[Category:Tagged Values]]
{{Edited|July|12|2024}}

Revision as of 15:27, 10 February 2024

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 accomplish 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 6 days ago on 05/05/2024. What links here