AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Página / Gestión del botón Atrás
  • Overview
  • Default synchronization
  • Overview
  • Implementation
  • Remarks
  • Enabling synchronization programmatically
  • Remarks
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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 "Permitido (ejecuta el código de sincronización)".
  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 "Proyecto" pane, in the "Proyecto" group, click on "Descripción".. On the "Advanced" tab, in "Default option for the browser "Back" button", select "Permitido (ejecuta el código de sincronización)".
  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 "Llamar al proceso de sincronización de la página si el usuario hizo clic el botón Atrás del navegador" 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 "Permitido (ejecuta el código de sincronización)".
  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 "Llamar al proceso de sincronización de la página si el usuario hizo clic el botón Atrás del navegador" 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.
Versión mínima requerida
  • Versión 9
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local