WEBDEV Concepts

48 Part 2: Developing a site 10 Events associated with pages 10.1 Default events The following events appear by default in the WEBDEV code editor: • Global declarations (server code) : Declaration of variables global to the page. This is the first code run when the page is opened. • Initialization (server code) : Executed when the page is opened. The initialization event of the page controls is run before this code. • Global declarations (browser code) : Declaration of browser variables global to the page. • Load (onload) page (browser code) : Browser code run when the page is displayed in the browser. • Unload (onunload) page (browser code) : Browser code run when a new page is displayed in the browser. • Whenever changing layout (sever code) : Run when the page layout is changed. • Request for refreshing the display (server code) : Contains all the code for refreshing the page controls: content of controls, state (visible, grayed, etc.), caption to refresh, etc. This event is started upon request by the following functions: • RequestRefreshUI : Executes the event at the end of the current event (asynchronous execution). • ExecuteRefreshUI : Executes the event immediately. • Closing the page (server code) : Run when the page is closed. • Page synchronization (server code) : Server code used to manage the page synchronization when clicking the browser "Back" button. • Set the Value property (internal page only) : Executed when a value is assigned to the Value property in the Internal Page control. • Get the Value property (internal pages only) : Executed when the Value property is used in read mode in the Internal Page control. 10.2 Optional events Several optional events can be managed. To use an optional event, you must: 1. Open the page code window. 2. Click "Add other events to the page", at the bottom of the list of events. The optional events window appears. 3. Select the optional event to add and validate. 4. The selected event is automatically added after the default events. You can manage, for example: • the mouse hover over the control, • left mouse button down, up, double click, • right mouse button down, up, double click, • the mouse wheel, etc. 11 Menus WEBDEV allows you to create a menu and/or a context menu in HTML pages. These menus correspond to specific controls. Main or context menus can be vertical or horizontal. From the different options of this menu, you can: • display pages, • execute the code of the Button controls in the page, • etc. WEBDEV allows you to: • Create main or context menus, • Edit main or context menus, • Delete main or context menus. For more details, see the online help.

RkJQdWJsaXNoZXIy NDQ0OA==