(Created page with "RunServerSideViewModelNow asks an implementing PeristenceServer - like MDrivenServer - to hurry up and execute a ServerSideViewModel asap. ServerSideViewModels are implement...") |
(Updated Edited template to July 12, 2025.) |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
RunServerSideViewModelNow asks an implementing | <message>Write the content here to display this box</message> | ||
RunServerSideViewModelNow asks an implementing PersistenceServer - like MDrivenServer - to hurry up and execute a ServerSideViewModel asap. | |||
ServerSideViewModels are | ServerSideViewModels are implemented by the MDrivenServer. They are often used to synchronize tasks such as assigning a new sequence number or the like. Often, the pattern is that the Client sets a state that the ServerSideViewModel finds with the ServerSide PS Criteria and then executes actions and saves. | ||
The Client | The Client waits for this to happen and issues a selfVM.Refresh to get the new data. | ||
Since ServerSideViewModels are polled with a defined interval (periodicity) | Since ServerSideViewModels are polled with a defined interval (periodicity), the wait for the Client may be longer than optimal for user experience. | ||
Use this call to influence the server to check for execution need as soon as possible instead of waiting the interval period: | Use this call to influence the server to check for execution need as soon as possible instead of waiting for the interval period: | ||
selfVM.Save; | selfVM.Save; | ||
selfVM.RunServerSideViewModelNow( SomeClass.ViewModels.SomeServerSideViewModelWeWaitFor ); | selfVM.RunServerSideViewModelNow( SomeClass.ViewModels.SomeServerSideViewModelWeWaitFor ); | ||
selfVM.Refresh | selfVM.Refresh | ||
[[Category:OCLOperators]] | |||
[[Category:OCL ViewModel Operators]] | |||
{{Edited|July|12|2025}} |
Latest revision as of 05:55, 20 January 2025
RunServerSideViewModelNow asks an implementing PersistenceServer - like MDrivenServer - to hurry up and execute a ServerSideViewModel asap.
ServerSideViewModels are implemented by the MDrivenServer. They are often used to synchronize tasks such as assigning a new sequence number or the like. Often, the pattern is that the Client sets a state that the ServerSideViewModel finds with the ServerSide PS Criteria and then executes actions and saves.
The Client waits for this to happen and issues a selfVM.Refresh to get the new data.
Since ServerSideViewModels are polled with a defined interval (periodicity), the wait for the Client may be longer than optimal for user experience.
Use this call to influence the server to check for execution need as soon as possible instead of waiting for the interval period:
selfVM.Save; selfVM.RunServerSideViewModelNow( SomeClass.ViewModels.SomeServerSideViewModelWeWaitFor ); selfVM.Refresh