PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Default synchronization
  • Overview
  • Implementation
  • Notes
  • Synchronization by programming
  • Notes
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. In the "Details" tab of page description ("Description" from the popup menu), check "Use the mechanism for synchronizing pages".
  2. Validate. This page will be automatically included in the history of browser pages: to go back to this page, use the "Back" key of the browser.
To implement the management of synchronization in all the project pages:
  1. In the project description ("Project .. Project description"), check "Use the mechanism for synchronizing pages".Display the project description: on the "Project" pane, in the "Project" group, click "Description". In the the "Options" tab, check "Use the mechanism for synchronizing pages".
  2. Validate. The project pages will be automatically included in the history of browser pages: to go back to these pages, use the browser "Back" key.

Notes

  • 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): to do so, check "Disable the mechanism for page synchronization for this control" in the "Advanced" screen 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. In the "Details" tab of page description ("Description" from the popup menu), check "Use the mechanism for synchronizing pages".
  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 management of synchronization, check "Disable the mechanism for page synchronization for this control" in the "Advanced" tab of control description.
  3. the the code required for custom management of synchronization in the synchronization code of page. Use ChangeAction in the synchronization code of the page. This function is used to define the action that will be performed in case of page desynchronization.

Notes

  • 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 required version
  • Version 9
Comments
Click [Add] to post a comment