PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Overview
  • Default synchronization
  • Overview
  • Implementation
  • Remarks
  • Synchronization by programming
  • Remarks
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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 management of synchronization,
  2. Management of synchronization by programming, in the synchronization code of the page.
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 Web 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 context menu), for "Using the browser "Back" button", select "Allowed (runs the synchronization code)".
  2. Validate. This page will be automatically included in the history of browser pages: to go back to this page, click the browser "Back" button.
To implement the management of synchronization in all project pages:
  1. Display the project description: on the "Project" pane, in the "Project" group, click "Description". In the "Advanced" tab, check "Use the mechanism for synchronizing pages (runs the synchronization code)".
  2. Validate. The project pages will be automatically included in the history of browser pages: 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 management of 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 by programming).
Synchronization by programming
To manage the synchronization by programming:
  1. On the "UI" tab of the page description ("Description" in the context menu), for "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 for custom management of 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 found on the computer of the Web user, we recommend that you:
    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