SAIF.Presentation.Web.Controls.V2.Menu operations and processes¶
This page is the operation catalog and cross-operation hub for this library. Each operation's detailed, step-by-step logic lives in its own page under operations/.
Operation catalog¶
| Operation | Intent | Trigger | Inputs | Outputs | Rules |
|---|---|---|---|---|---|
| Acquire navigation data | Obtain the signed-in user's authorised menu items, loading them once per session. | First access to NavigationData in a control's page lifecycle within a given ASP.NET session. |
Windows logon identity (Request.LogonUserIdentity.Name); Session("navdata"). |
A NavigationContext holding the user's authorised menu items, cached in session. |
BR-MENU-001, BR-MENU-002 |
| Build the left menu | Construct the SAIFMenu control tree — icons, context box, favourites, and applications accordion — on the page lifecycle. |
SAIFMenu.OnInit (icon/header setup) followed by OnLoad (full control tree build) on every page life-cycle pass. |
Hosting page cast to ViewPageBase; navigation data from Acquire navigation data. |
Fully populated SAIFMenu control tree, registered client scripts. |
BR-MENU-005, BR-MENU-006 |
| Present the context search box | Render and manage the context search textbox, including its watermark/placeholder behaviour and change notification. | SAIFMenu.InitializeControls, invoked from CreateControls during OnLoad; property access on ContextValue. |
ContextViewStyle, ContextLabel, UpperCaseContextValue, posted textbox value. |
Rendered context textbox; ContextValue property; OnContextChanged event. |
BR-MENU-011, BR-MENU-012 |
| Render favourites | Render the favourites list — the user's pinned pages plus, for external clients, a self-service password-change link. | SAIFMenu.AddFavorites, invoked from CreateControls during OnLoad. |
NavigationData.MenuAuthorizedItems.Favorites; AppGlobal.EnvironmentService.IsClientExternal; current item. |
One LinkButton per favourite, wired to LinkButtonClick; an optional ChangePWLink. |
BR-MENU-018, BR-MENU-019 |
| Render the applications accordion | Build the collapsible, per-category applications accordion trimmed to the user's authorised, visible menu items. | SAIFMenu.AddLinks, invoked from CreateControls during OnLoad, and again when the applications section is expanded. |
ShowApps; NavigationData.MenuAuthorizedItems; SelectedCategory. |
An AjaxControlToolkit.Accordion (UMenu) with one pane per category and a LinkButton per visible item. |
BR-MENU-024, BR-MENU-025 |
| Expand or collapse the applications section | Toggle the applications accordion between expanded and collapsed, and persist the user's choice. | Clicking the expand/collapse toggle icon (SAIFMenu.ExpandClick). |
Current ContextValue; current ShowApps state; Preferences (may be Nothing). |
Rebuilt or removed accordion; updated ShowApps; persisted SHOWAPPS preference. |
BR-MENU-032, BR-MENU-033 |
| Restore menu state on page pre-load | Re-establish the left menu's session-scoped state (expanded/collapsed, current page, context value) at the start of each page life cycle. | SAIFMenu.Page_PreLoad, subscribed via the ViewPageBase.PreLoad event. |
m_Page.ViewID; IsPostBack; authenticated identity; stored SHOWAPPS preference; Session("CVTextBox" & ViewID). |
ShowApps state; cached CurrentPage; restored ContextValue. |
BR-MENU-036, BR-MENU-037 |
| Resolve the user's preference store | Construct the clsPreferences instance used to read and write the SHOWAPPS layout preference, or determine that preferences are unavailable. |
SAIFMenu.Preferences property access (called from Restore menu state on page pre-load and Expand or collapse the applications section). |
HttpContext.Current.User.Identity.Name. |
A clsPreferences instance scoped to <username>/BOMENU, or Nothing. |
BR-MENU-041, BR-MENU-042 |
| 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. | SAIFMenu.LinkButtonClick, the Click event of a favourite or application LinkButton. |
Clicked control's ID; NavigationData.MenuAuthorizedItems. |
MenuNavigate(ApplicationPath, PageLink) event, or a direct redirect for the change-password link. |
BR-MENU-044, BR-MENU-045 |
| Handle menu icon and Enter-key actions | Route clicks on the favourites-configuration icon, the hidden default-submit button, and the Enter-key link button to the correct event. | SAIFMenu.MenuImage_Click (icon clicks) and m_EnterControl_Click (hidden EC LinkButton postback). |
Clicked control identity; current ContextValue. |
MenuNavigate("MenuCache", "frmFavoriteMaint.aspx"); DefaultOnSubmit(); MenuNavigate("ContextValue", "ENTER"). |
BR-MENU-049, BR-MENU-050 |
| Build the top menu and toolbar | Construct the SAIFMenuTop control tree — the top page-link row and the full set of toolbar action icons. |
SAIFMenuTop.CreateChildControls, invoked during the ASP.NET control-tree creation phase. |
Navigation data (see Acquire navigation data). | TopMenuApp-row link panel; TopMenuIcons panel with all toolbar SAIFImageButton icons. |
BR-MENU-052, BR-MENU-053 |
| Build top page links | Render the top row of page links for the currently selected category, trimmed to authorised, visible items. | SAIFMenuTop.BuildLinkCollection, invoked from Build the top menu and toolbar. |
NavigationData.MenuAuthorizedItems.AppItemsByCategory(SelectedCategory). |
One LinkButton (top_LB<MenuItemSeqNum>) per visible item. |
BR-MENU-055, BR-MENU-056 |
| Derive toolbar button visibility from the current page | Gate each toolbar button's visibility, enabled state, and tooltip on the current authorised page's action-capability flags. | SAIFMenuTop.Page_PreLoad, subscribed via the ViewPageBase.PreLoad event. |
m_Page.ViewID; NavigationData.GetCurrentPage(); IsPostBack. |
Updated Visible/Enabled/ToolTip on each toolbar clsMenuButton; registered one-click guard scripts. |
BR-MENU-036, BR-MENU-039 |
| Prepare and render the toolbar | Synchronise each toolbar icon's rendered image/access-key/tooltip from its logical button model, then render the navigation and toolbar markup in a fixed order. | SAIFMenuTop.OnPreRender followed by RenderControl during the ASP.NET render phase. |
clsMenuButton state per icon; EnableButtonIndicators; browser user agent (for Firefox detection). |
Rendered navigation and toolbar markup; client-side one-click/indicator attributes. | BR-MENU-062, BR-MENU-063 |
| Render an image button | Apply the shared SAIFImageButton CSS class and, when the activity indicator is enabled, wire up the client-side indicator/form-disable script. | SAIFImageButton.PreRender, during the ASP.NET render phase for any SAIFImageButton instance. |
EnableIndicator. |
CSS class on the rendered <img>/<input>; registered ImageButton.js reference; DisableFormControls attribute. |
BR-MENU-072, BR-MENU-073 |
| Handle a toolbar click | Map a clicked toolbar icon to its logical ToolBarButton action and raise the corresponding event(s) for the host page. |
SAIFMenuTop.MenuImage_Click, the Click event of a toolbar SAIFImageButton. |
Clicked control's ID. |
ToolbarClick(ToolBarButton); DefaultOnSubmit(); MenuNavigate("", "Help") (help icon only). |
BR-MENU-075, BR-MENU-050 |
Process flow diagram¶
The following diagram visualizes the primary operational flow across operations.
flowchart TD
Start([Page request]) --> Acquire["Acquire navigation data"]
Acquire --> Left["Build the left menu"]
Acquire --> Top["Build the top menu and toolbar"]
Left --> Restore["Restore menu state on page pre-load"]
Top --> Derive["Derive toolbar button visibility from the current page"]
Restore --> Render1["Render favourites / applications accordion"]
Derive --> Render2["Prepare and render the toolbar"]
Render1 --> Click{"User clicks a link or icon?"}
Render2 --> Click
Click -->|Menu link| Handle1["Handle a menu link click"]
Click -->|Toolbar icon| Handle2["Handle a toolbar click"]
Handle1 --> Nav([MenuNavigate to host page])
Handle2 --> Tool([ToolbarClick to host page])
Failure and edge-case behavior¶
- Design-time rendering never touches session, the database, or navigation data; all three controls emit static placeholder content instead (BR-MENU-001, BR-MENU-018, BR-MENU-055).
- A malformed or unresolvable menu-link click is silently ignored rather than raising an error (BR-MENU-048).
- Toolbar click handlers do not re-check button visibility or enabled state on the server, so a forged postback targeting a hidden/disabled action still raises its event (BR-MENU-077).
- Unhandled exceptions during
SAIFMenu/SAIFMenuToprendering are caught and their message, source, and stack trace are written directly into the page rather than raised (BR-MENU-071). - Invalid accordion pane IDs (empty,
_Header, or duplicate) throwApplicationExceptionrather than silently skipping the pane (BR-MENU-028).
Related documentation¶
- Index
- Overview
- Architecture
- Dependencies
- Business rules
- Database tables
- Security and authorization
- Control catalog
- API reference
Sources¶
SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenu.vbSAIF.Presentation.Web.Controls.V2.Menu/SAIFMenuTop.vbSAIF.Presentation.Web.Controls.V2.Menu/SAIFImageButton.vb