Skip to content

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

  1. In design mode, emit three placeholder links (Page 1–3). Enforces BR-MENU-055.
  2. At run time, sort authorised items by MenuOrder, then iterate MenuAuthorizedItems.AppItemsByCategory(SelectedCategory). Enforces BR-MENU-056.
  3. Delegates to SAIF.Business.Menu.
  4. Create a LinkButton top_LB<MenuItemSeqNum> for each visible item, wired to LinkButtonClick, styled TopMenuApp-rowSelected when 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&lt;MenuItemSeqNum&gt; 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.

Sources

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