ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Web-specific functions / Page functions
  • Synchronization
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
ChangeAction (Function)
In french: ChangeAction
Used to specify the action to perform when the HTML page displayed in the browser is no longer synchronized with the page context on server.
By default, in case of out-of-sync pages, the last version of the HTML page corresponding to the current context on server is returned.
Caution: This function is run in the synchronization code of the page.
// Synchronization code of PAGE_Summary
// (The action does not have to be synchronized)
ChangeAction(caContinue)
Syntax
<Result> = ChangeAction(<Action>)
<Result>: Integer constant
Former management mode of synchronization (before the call to ChangeAction):
caContinueThe application continues as if a synchronization was performed.
The action requested by the Web user will be run.
caErrorThe last version of HTML page corresponding to the current context on server is returned.
A dialog box informs the user that a synchronization error occurred.
The action requested by the Web user will not be run.

This management mode is the default one.
caNoneNo action is performed. The action requested by the Web user is not run.
An error will occur if the process for page synchronization is using this option without calling PageDisplay or PageRefresh. This error indicates that no page was returned by the server (ERR_NO_CURRENT_PAGE).
<Action>: Integer constant
Action to perform if the context and the page are out of sync:
caContinueThe application continues as if a synchronization was performed.
The action requested by the Web user will be run.
Remark: Before using this option, make sure that the current record is the expected one to avoid overwriting data.
caErrorThe last version of HTML page corresponding to the current context on server is returned.
A dialog box informs the user that a synchronization error occurred.
The action requested by the Web user will not be run.

This management mode is the default one.
caNoneNo action is performed. The action requested by the Web user is not run.
It is recommended to return a page with PageDisplay or PageRefresh before using ChangeAction with the caNone constant . Otherwise, an error indicating that no page was returned by the server (ERR_NO_CURRENT_PAGE) will occur.
Remarks

Synchronization

Whenever the user clicks an HTML Page, a synchronization test is automatically performed.
This synchronization test consists in checking that the page displayed by the browser corresponds to the context of the current page on the server.
Synchronization problems may occur when using the BACK key or the REFRESH key in the browser of the Web user. The page synchronization is managed only in one of the following cases:
  • In the "UI" tab of the page description window, the option "Browser "Back" button" corresponds to the value "Allowed (runs the synchronization code)".
  • In the "Advanced" tab of the project description window, the option "Default option for the browser "Back" button" corresponds to the value "Allowed (runs the synchronization code)".
Component: wd300page.dll
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help