Render favourites¶
Render the favourites list — the user's pinned pages plus, for external clients, a self-service password-change link. This operation is implemented by SAIFMenu.AddFavorites.
| Field | Value |
|---|---|
| Operation ID | OP-MENU-004 |
| Trigger | SAIFMenu.AddFavorites, invoked from CreateControls during OnLoad. |
| Inputs | NavigationData.MenuAuthorizedItems.Favorites; AppGlobal.EnvironmentService.IsClientExternal; current item. |
| Outputs | One LinkButton per favourite, wired to LinkButtonClick; an optional ChangePWLink. |
| Primary components | SAIFMenu.AddFavorites |
| Entry point | SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenu.vb |
Steps¶
- In design mode, emit three placeholder favourite links (
Favorite 1–3). Enforces BR-MENU-018. - At run time, take
NavigationData.MenuAuthorizedItems.Favoritesand, when non-empty, sort it byMenuOrder. Enforces BR-MENU-019. - Delegates sorting to
clsMenuAuthorizedItemCollectioninSAIF.Business.Menu. - For each favourite create a
LinkButtonwith ID<controlId>fav_LB<MenuItemSeqNum>, tooltip<MenuCategory> - <ToolTip>and textFavoritePageName, wired toLinkButtonClick. Enforces BR-MENU-020, BR-MENU-021. - Style the link
favoriteitem-selectedwhen itsMenuPageSeqNummatches the current item; otherwisefavoriteitem. Enforces BR-MENU-022. - If
AppGlobal.EnvironmentService.IsClientExternalis true, append a "Change Password" link. Enforces BR-MENU-023. - Delegates to the SAIF framework environment service.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start(["SAIFMenu.AddFavorites"]) --> Design{Design mode?}
Design -->|Yes| Placeholders(["Emit placeholder favourite links 1-3"])
Design -->|No| Sort["Take MenuAuthorizedItems.Favorites, sort by MenuOrder if non-empty"]
Sort --> Create["Create LinkButton <controlId>fav_LB<MenuItemSeqNum>"]
Create --> Tooltip["Set tooltip MenuCategory - ToolTip, text FavoritePageName"]
Tooltip --> Wire["Wire to LinkButtonClick"]
Wire --> Style["Style favoriteitem-selected when matching current item"]
Style --> External{IsClientExternal?}
External -->|Yes| ChangePw["Append Change Password link"]
External -->|No| End(["One LinkButton per favourite"])
ChangePw --> End
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/SAIFMenu.vb