Resolve current menu item / page identity¶
This operation resolves the currently-authorized menu item (or page) for the running page, by matching the application code, category, and link against the previously loaded authorized item set.
| Field | Value |
|---|---|
| Operation ID | OP-NC-002 |
| Trigger | Page code requesting its own menu/page identity (e.g. to control breadcrumb/help/authorization display) |
| Inputs | Category string and/or current HttpContext.Current.Request URL |
| Outputs | A clsMenuAuthorizedItem or Nothing |
| Primary components | NavigationContext.GetCurrentItem, GetCurrentPage, GetItem, GetItemSeq, IsMenuItem |
| Entry point | SAIF.Presentation.Web.Core.Infragistics103\NavigationContext.vb |
Steps¶
- Derives
appPathfromHttpContext.Current.Request.ApplicationPath(strips/) and, forGetCurrentItem/GetCurrentPage, derivesPageLinkfromRequest.RawUrlrelative to the application path. - Looks up the app code via
ApplicationCodes.ItemByAppPath(appPath)(cached statically the first time viaclsApplicationCodeCollection.GetActiveApplicationCodes). - If an app code is found, attempts an exact match first:
MenuAuthorizedItems.ItemExact(AppCode, category, link, True)— enforces BR-NC-002. - If no exact match, falls back to a looser
MenuAuthorizedItems.Item(AppCode, category, link, True)match by category/link only. - If no app code was resolved (
AppCodeempty): the method returnsNothing/empty result without further lookup. GetItemSeqandIsMenuItemfollow the analogous app-code → item-lookup pattern to return a sequence number or a boolean existence check, respectively.
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([Request page identity]) --> S1[Derive appPath / PageLink from request]
S1 --> S2[Look up ApplicationCode by app path]
S2 --> D1{App code found?}
D1 -->|No| EndNothing([Return Nothing])
D1 -->|Yes| S3[Attempt ItemExact match]
S3 --> D2{Exact match found?}
D2 -->|Yes| EndExact([Return exact match])
D2 -->|No| S4[Fall back to Item loose match]
S4 --> EndLoose([Return loose match or Nothing])
Failure and edge-case behavior¶
- If the application code itself cannot be resolved,
Nothingis returned without attempting any item lookup.
Related documentation¶
Sources¶
- SAIF.Presentation.Web.Core.Infragistics103\NavigationContext.vb