ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Web-specific functions / Page functions
  • How to know if the initialization of a control was triggered by PageInitialization?
  • Caution
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
PageInitialization (Function)
In french: PageInitialisation
AjaxNot available
Resets to zero (or not) the controls found in the current page and starts the events for initializing the controls and the page.
Example
// Initialize the controls
//(the controls are reset to blank first)
PageInitialization()
// Initialize the controls
//(don't reset the controls first)
PageInitialization(False)
Syntax
PageInitialization([<Reset>])
<Reset>: Optional boolean
  • True (default value) if the controls must be reset before running the event for initializing the controls and the page,
  • False if the controls must not be reset to blank.
Remarks

How to know if the initialization of a control was triggered by PageInitialization?

Use the OPENING variable (boolean) in the initialization code of the control to use.
The OPENING variable is set to:
  • True if the initialization event was triggered when the page was opened,
  • False if the initialization event was triggered by PageInitialization.
Therefore, the execution of processes in the control initialization can depend on the value of the OPENING variable.
For example, here is how to initialize the List controls only if OPENING is set to True:
// Control initialization
IF OPENING = True THEN
...
END

Caution

  • PageInitialization must not be called in the event "Opening" of a page.
  • Do not confuse PageInitialization with Reset, which resets all the page controls (without running the "Initializing" event of the controls).
Component: wd300page.dll
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help