Build top page links¶
Render the top row of page links for the currently selected category, trimmed to authorised, visible items. This operation is implemented by SAIFMenuTop.BuildLinkCollection.
| Field | Value |
|---|---|
| Operation ID | OP-MENU-012 |
| Trigger | SAIFMenuTop.BuildLinkCollection, invoked from Build the top menu and toolbar. |
| Inputs | NavigationData.MenuAuthorizedItems.AppItemsByCategory(SelectedCategory). |
| Outputs | One LinkButton (top_LB<MenuItemSeqNum>) per visible item. |
| Primary components | SAIFMenuTop.BuildLinkCollection |
| Entry point | SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenuTop.vb |
Steps¶
- In design mode, emit three placeholder links (
Page 1–3). Enforces BR-MENU-055. - At run time, sort authorised items by
MenuOrder, then iterateMenuAuthorizedItems.AppItemsByCategory(SelectedCategory). Enforces BR-MENU-056. - Delegates to
SAIF.Business.Menu. - Create a
LinkButtontop_LB<MenuItemSeqNum>for each visible item, wired toLinkButtonClick, styledTopMenuApp-rowSelectedwhen it matches the current item. Enforces BR-MENU-057, BR-MENU-058.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start(["SAIFMenuTop.BuildLinkCollection"]) --> Design{Design mode?}
Design -->|Yes| Placeholders(["Emit placeholder links Page 1-3"])
Design -->|No| Sort["Sort authorised items by MenuOrder"]
Sort --> Iterate["Iterate MenuAuthorizedItems.AppItemsByCategory(SelectedCategory)"]
Iterate --> Create["Create LinkButton top_LB<MenuItemSeqNum> per visible item"]
Create --> Wire["Wire to LinkButtonClick"]
Wire --> Style["Style TopMenuApp-rowSelected when matching current item"]
Style --> End(["One LinkButton per visible item"])
Failure and edge-case behavior¶
- No exceptional failure paths beyond those noted in the steps above.
Related documentation¶
Sources¶
SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenuTop.vb