Skip to content

Handle a menu link click

Resolve a clicked favourite or application link back to an authorised menu item and raise navigation for the host page. This operation is implemented by SAIFMenu.LinkButtonClick, SAIFMenu.NavigateToItem.

Field Value
Operation ID OP-MENU-009
Trigger SAIFMenu.LinkButtonClick, the Click event of a favourite or application LinkButton.
Inputs Clicked control's ID; NavigationData.MenuAuthorizedItems.
Outputs MenuNavigate(ApplicationPath, PageLink) event, or a direct redirect for the change-password link.
Primary components SAIFMenu.LinkButtonClick, SAIFMenu.NavigateToItem
Entry point SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenu.vb

Steps

  1. If the clicked link ID contains ChangePWLink, redirect to /BusinessOnline/Changepassword.aspx?__SAIFPID=<ViewID>. Enforces BR-MENU-044.
  2. Otherwise parse the menu item sequence number from the substring following _LB in the link ID. Enforces BR-MENU-045.
  3. Look the item up in NavigationData.MenuAuthorizedItems, persist the current context value to Session("CVTextBox" & ViewID), and raise MenuNavigate(ApplicationPath, PageLink). Enforces BR-MENU-046, BR-MENU-047.
    • On failure: any exception during sequence parsing or navigation is swallowed by an empty Catch. Enforces BR-MENU-048.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start(["SAIFMenu.LinkButtonClick, the Click event of a favourite or application link"]) --> Check{Link ID contains ChangePWLink?}
    Check -->|Yes| Redirect(["Redirect to Changepassword.aspx"])
    Check -->|No| Parse["Parse menu item sequence number from _LB suffix"]
    Parse --> Lookup["Look up item in MenuAuthorizedItems"]
    Lookup --> Persist["Persist context value to Session(&quot;CVTextBox&quot; & ViewID)"]
    Persist --> Raise(["Raise MenuNavigate(ApplicationPath, PageLink)"])
    Parse -.->|Exception| Swallow(["Caught by empty Catch, ignored"])

Failure and edge-case behavior

  • Malformed link ID or lookup failure: silently ignored, no event raised, no error surfaced (BR-MENU-048).

Sources

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