Skip to content

Build the left menu

Construct the SAIFMenu control tree — icons, context box, favourites, and applications accordion — on the page lifecycle. This operation is implemented by SAIFMenu.OnInit, SAIFMenu.OnLoad.

Field Value
Operation ID OP-MENU-002
Trigger SAIFMenu.OnInit (icon/header setup) followed by OnLoad (full control tree build) on every page life-cycle pass.
Inputs Hosting page cast to ViewPageBase; navigation data from Acquire navigation data.
Outputs Fully populated SAIFMenu control tree, registered client scripts.
Primary components SAIFMenu.OnInit, SAIFMenu.OnLoad
Entry point SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenu.vb

Steps

  1. OnInit casts the page to ViewPageBase, then runs CreateControlsBegin, which builds the menu icons (imgDefaultOnSubmit, imgFavoriteConfig) and the favourites header panel. Enforces BR-MENU-005, BR-MENU-006.
  2. OnLoad runs CreateControls, which initialises the context textbox (see Present the context search box), adds the application links (see Render the applications accordion), adds the favourites (see Render favourites) and assembles the sections. Enforces BR-MENU-007.
  3. OnLoad registers a hot-key startup script binding F12 (key code 123, without Ctrl) to select and focus the context textbox, and Enter to post back through the hidden EC link button. Enforces BR-MENU-008, BR-MENU-009.
  4. OnLoad registers the watermark script block (js_waterMark_Focus / js_waterMark_Blur) once per page. Enforces BR-MENU-010.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Init["OnInit: cast page to ViewPageBase"] --> Begin["CreateControlsBegin: build menu icons and favourites header panel"]
    Begin --> Load["OnLoad: CreateControls"]
    Load --> Context["Initialize context textbox"]
    Load --> Accordion["Add application links"]
    Load --> Favs["Add favourites"]
    Context --> Assemble["Assemble sections"]
    Accordion --> Assemble
    Favs --> Assemble
    Assemble --> Hotkeys["Register F12 and Enter hot-key scripts"]
    Hotkeys --> Watermark["Register watermark script block once per page"]
    Watermark --> End(["Fully populated SAIFMenu control tree"])

Failure and edge-case behavior

  • Hosting page is not a ViewPageBase: m_Page is Nothing; ViewID-derived session keys fall back to an empty string (BR-MENU-005, BR-MENU-036).

Sources

  • SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenu.vb