ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Developing an application or website / Controls, windows and pages / Page / Back button
  • Overview
  • Default synchronization
  • Overview
  • Implementation
  • Remarks
  • Enabling synchronization programmatically
  • Remarks
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Overview
For each action performed on a page, the page synchronization mechanism automatically checks the synchronization. This mechanism checks whether the page displayed in the browser corresponds to the page session on the server side.
There are two methods to manage synchronization:
  1. Default synchronization,
  2. Manage synchronization programmatically, 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 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), 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. Display the project description: under the "Project" pane, in the "Project" group, click on "Description".. On 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.
  • For page fields not requiring synchronization management ("Close" button, for example), it is possible to disconnect the synchronization mechanism: simply uncheck the "Call page synchronization process if the user pressed the Back button" option in the "Advanced" tab of the field description.
  • The warning message can be customized (see synchronization programmatically).
Enabling synchronization programmatically
To manage the synchronization through programming:
  1. On the "UI" tab of the page description ("Description" in the context menu), in "Using the browser "Back" button", select "Allowed (runs the synchronization code)".
  2. If necessary, configure the page controls for which synchronization must not be enabled.
    For each control that triggers an action on the server, you can specify whether the page synchronization must be enabled (default option) or ignored during this action.
    To ignore synchronization, simply uncheck "Call page synchronization process if the user pressed the 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, specify the following in the page synchronization code:
    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 the 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

Last update: 03/27/2025

Send a report | Local help