|
|
|
|
|
- Overview
- Default synchronization
- Overview
- Implementation
- Remarks
- Enabling synchronization programmatically
- Remarks
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: - 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)".
- 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: - 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)".
- 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: - 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)".
- 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. - 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:
- the custom message
- 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:
- use a hidden control containing the identifier of the displayed and selected record,
- in the synchronization code, find the current record on the browser. This search is performed from the identifier found in the hidden control.
- refresh the page.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|