PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Default synchronization
  • Overview
  • Implementation
  • Remarks
  • Synchronization through programming
  • Remarks
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
Managing the synchronization
Overview
For each action performed in a page, the mechanism for page synchronization automatically checks the synchronization. This check consists in verifying whether the page displayed in the browser corresponds to the page context found on the server.
Two modes can be used to manage the synchronization:
  1. Default synchronization management,
  2. Management of the synchronization through programming, in the page synchronization code.
Default synchronization

Overview

The synchronization mechanism is triggered only if the option "Use the mechanism for synchronizing pages" is selected for the page.
If a desynchronization occurs, a warning message informs the user that the requested action has not been performed. The page corresponding to the context found on the server is redisplayed. The site can continue to operate.

Implementation

To implement the management of synchronization in a page:
  1. On the "UI" tab of the page description ("Description" in the popup menu), in "Using the browser "Back" button", select "Allowed (runs the synchronization code)".
  2. Validate. This page will be automatically included in the browser page history: to go back to this page, click the browser "Back" button.
To implement the management of synchronization in all project pages:
  1. Open the project description: on the "Project" tab, in the "Project" group, click "Description". In the "Advanced" tab, in "Default option for the browser "Back" button", select "Allowed (runs the synchronization code)".
  2. Validate. The project pages will be automatically included in the browser page history: to go back to these pages, click the browser "Back" button.

Remarks

  • This management mode requires no specific WLanguage code.
  • The synchronization mechanism can be disabled for the page controls that do not require a synchronization ("Close" button for example): simply uncheck "Call the page synchronization process if the user pressed the browser Back button" in the "Advanced" tab of the control description.
  • The warning message can be customized (see the synchronization through programming).
Synchronization through programming
To manage the synchronization through programming:
  1. On the "UI" tab of the page description ("Description" in the popup menu), in "Using the browser "Back" button", select "Allowed (runs the synchronization code)".
  2. Configure (if necessary) the page controls for which the synchronization must not be managed.
    For each control that triggers an action on the server, you can specify whether the page synchronization must be managed (default option) or ignored during this action.
    To ignore the synchronization management, simply uncheck "Call the page synchronization process if the user pressed the browser Back button" in the "Advanced" tab of the control description.
  3. Enter the code required to set a custom synchronization in the page synchronization code. Use ChangeAction in the page synchronization code. This function is used to define the action that will be performed if the page is desynchronized.

Remarks

  • ChangeAction is initialized with "No action" if a WLanguage function used to display or redisplay a page is called in the synchronization code of the page.
  • To customize the desynchronization message, all you have to do is enter in the synchronization code of the page:
    1. the custom message
    2. the redisplay of the current page on the server (with PageRefresh for example).
  • To perform a synchronization from the information on the user's computer, it is recommended to:
    1. use a hidden control containing the identifier of displayed and selected record,
    2. in the synchronization code, find the current record on the browser. This search is performed from the identifier found in the hidden control.
    3. refresh the page.
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment