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¶
- If the clicked link ID contains
ChangePWLink, redirect to/BusinessOnline/Changepassword.aspx?__SAIFPID=<ViewID>. Enforces BR-MENU-044. - Otherwise parse the menu item sequence number from the substring following
_LBin the link ID. Enforces BR-MENU-045. - Look the item up in
NavigationData.MenuAuthorizedItems, persist the current context value toSession("CVTextBox" & ViewID), and raiseMenuNavigate(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.
- On failure: any exception during sequence parsing or navigation is swallowed by an empty
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("CVTextBox" & 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).
Related documentation¶
Sources¶
SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenu.vb