---
title: SAIF.Presentation.Web.MVC operations and processes
summary: Business and technical operations supported by this library.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.MVC
reference_type: package
---

# SAIF.Presentation.Web.MVC 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 | Tables | SQL |
| --- | --- | --- | --- | --- | --- | --- | --- |
| [Initialize a request](operations/initialize-request.md) | Run the fixed per-request lifecycle: timeout handling, security, menu authorization, model init, query string and context processing | `ViewPageBase.Page_Init` after the factory produces the controller | `HttpContext.Current`, session keys `navdata`, `<ViewID>-model`, `<ViewID>-viewdata` | Established principal, cached `NavigationContext`, initialized model, applied query string/context, or a redirect | [BR-MVC-001](business-rules.md#br-mvc-001-session-timeout-treated-as-an-unprocessable-postback), [BR-MVC-004](business-rules.md#br-mvc-004-every-request-carries-a-single-established-security-principal), [BR-MVC-006](business-rules.md#br-mvc-006-the-authorized-menu-set-is-loaded-once-per-session), [BR-MVC-007](business-rules.md#br-mvc-007-page-access-requires-menu-authorization), [BR-MVC-016](business-rules.md#br-mvc-016-a-model-initializes-exactly-once-per-instance) | — | — |
| [Establish the security principal](operations/establish-security-principal.md) | Establish or reuse the authenticated `clsSecurityPrincipal`, or challenge/deny the caller | Step 4 of Initialize; also callable directly by derived controllers | `Model.Context.SecurityPrincipal`, `Request.UserHostAddress` | Populated `Context.SecurityPrincipal`, `STYPE` cookie, or a 401 challenge/thrown exception | [BR-MVC-004](business-rules.md#br-mvc-004-every-request-carries-a-single-established-security-principal), [BR-MVC-005](business-rules.md#br-mvc-005-unauthenticated-callers-are-challenged-or-refused-by-network-zone), [BR-MVC-014](business-rules.md#br-mvc-014-the-authenticated-user-name-is-exposed-via-the-stype-cookie) | — | — |
| [Enforce menu-based page authorization](operations/enforce-menu-authorization.md) | Deny access to any page not present in the user's authorized menu set | Step 6 of Initialize, every request | `Request.Url.LocalPath`, `Session("navdata")` | Continue, or clear `navdata` and redirect to the login screen | [BR-MVC-007](business-rules.md#br-mvc-007-page-access-requires-menu-authorization), [BR-MVC-015](business-rules.md#br-mvc-015-menu-authorization-data-is-read-from-oracle-as-user-menu) | — | — |
| [Navigate to a view](operations/navigate-to-view.md) | Move the user to another view, in-app or cross-app, persisting context or opening a popup as needed | Derived controller decides to leave the current view; also used by `ViewPageBase.ProcessError` | `TargetApp`, `TargetView`, popup options, optional new model GUID | Context rows saved (cross-app case), `__SAIFPID` session entry (same-app case), redirect or popup script | [BR-MVC-008](business-rules.md#br-mvc-008-multi-model-view-state-is-keyed-by-a-per-view-guid), [BR-MVC-009](business-rules.md#br-mvc-009-absolute-navigation-targets-are-preserved-verbatim), [BR-MVC-010](business-rules.md#br-mvc-010-every-navigation-records-sourcetarget-app-and-view), [BR-MVC-011](business-rules.md#br-mvc-011-context-is-persisted-only-on-genuine-cross-app-transitions), [BR-MVC-012](business-rules.md#br-mvc-012-redirect-induced-thread-aborts-are-suppressed), [BR-MVC-013](business-rules.md#br-mvc-013-popup-navigation-uses-a-fixed-window-geometry) | [Context](database-tables.md#context) | [SQL-001](sql/SQL-001-insert-context-row.md) |
| [Navigate with a fresh model](operations/navigate-with-fresh-model.md) | Construct a brand-new model/view-data pair under a new GUID, then delegate to Navigate | Derived controller opens a new logical window/instance under multi-model support | `SupportsMultiModel`, factory-built model, current `ViewData` | New model/view data stored under a new GUID; delegates to Navigate | [BR-MVC-008](business-rules.md#br-mvc-008-multi-model-view-state-is-keyed-by-a-per-view-guid), [BR-MVC-011](business-rules.md#br-mvc-011-context-is-persisted-only-on-genuine-cross-app-transitions) | [Context](database-tables.md#context) | [SQL-001](sql/SQL-001-insert-context-row.md) |
| [Receive inbound cross-application context](operations/receive-inbound-context.md) | Retrieve and apply context left by a source application, completing a deferred navigation if present | `Initialize` step 10, when a referrer exists | Referrer path, current request path | Applied context via `HandleContext`; possible immediate `Navigate` | [BR-MVC-010](business-rules.md#br-mvc-010-every-navigation-records-sourcetarget-app-and-view), [BR-MVC-017](business-rules.md#br-mvc-017-cross-application-context-is-consumed-exactly-once) | [Context](database-tables.md#context) | [SQL-002](sql/SQL-002-retrieve-context-rows.md), [SQL-003](sql/SQL-003-retrieve-context-value-by-name.md) |
| [Load the user's authorized menu](operations/load-authorized-menu.md) | Load and cache the user's Oracle-backed menu authorization set for the session | First request of a session (step 5 of Initialize) | Upper-cased, trimmed user ID | `MenuAuthorizedItems` collection cached in session | [BR-MVC-006](business-rules.md#br-mvc-006-the-authorized-menu-set-is-loaded-once-per-session), [BR-MVC-015](business-rules.md#br-mvc-015-menu-authorization-data-is-read-from-oracle-as-user-menu), [BR-MVC-018](business-rules.md#br-mvc-018-reference-data-caches-are-process-lifetime-not-per-session) | — | — |
| [Retrieve and consume context rows](operations/retrieve-context-rows.md) | Read and delete a source application's context rows for the current session, consuming the hand-off exactly once | Called by `CheckContext` when the referrer application differs from the current one | Source app, current app, session ID | Hashtable of context values; source rows deleted | [BR-MVC-017](business-rules.md#br-mvc-017-cross-application-context-is-consumed-exactly-once) | [Context](database-tables.md#context) | [SQL-002](sql/SQL-002-retrieve-context-rows.md), [SQL-004](sql/SQL-004-delete-context-rows.md) |
| [Persist context rows](operations/persist-context-rows.md) | Replace an application's context rows for a session with the current in-memory context values | Called by `Navigate` on a genuine cross-app transition | Application name, session ID, in-memory context hashtable | Prior rows deleted, new rows inserted | [BR-MVC-017](business-rules.md#br-mvc-017-cross-application-context-is-consumed-exactly-once), [BR-MVC-019](business-rules.md#br-mvc-019-context-persistence-targets-database-appm-under-tag-netframework) | [Context](database-tables.md#context) | [SQL-004](sql/SQL-004-delete-context-rows.md), [SQL-001](sql/SQL-001-insert-context-row.md) |
| [Harvest posted control values](operations/harvest-posted-control-values.md) | Walk the page's control tree and collect posted values into a name/value map for the screen's `Retrieve` | `Page_Load` → `CallRetrieve` | Page control tree | Hashtable of control values keyed by control ID | [BR-MVC-020](business-rules.md#br-mvc-020-posted-control-values-are-harvested-by-recognized-type), [BR-MVC-021](business-rules.md#br-mvc-021-vendorsaif-controls-are-recognized-by-type-name-not-assembly-reference) | — | — |
| [Page error processing](operations/page-error-processing.md) | Classify and route an unhandled page exception, giving the application first refusal | `Page_Error` → `ProcessError` | Unhandled exception | Message control text set, navigation to the default view, or delegation to central error handling | [BR-MVC-022](business-rules.md#br-mvc-022-applications-may-self-handle-exceptions), [BR-MVC-023](business-rules.md#br-mvc-023-database-timeoutunavailable-errors-show-a-retryable-message) | — | — |
| [Central error handling](operations/central-error-handling.md) | Log and e-mail an error, then redirect to an appropriate error page | Delegated from `ProcessError` or called directly | Exception, model, context | Logged/e-mailed error, redirect to the error page with an encoded message | [BR-MVC-012](business-rules.md#br-mvc-012-redirect-induced-thread-aborts-are-suppressed), [BR-MVC-024](business-rules.md#br-mvc-024-every-framework-handled-error-is-logged-and-e-mailed-to-support), [BR-MVC-025](business-rules.md#br-mvc-025-the-error-page-falls-back-by-network-zone-when-unconfigured), [BR-MVC-026](business-rules.md#br-mvc-026-error-messages-are-html-encoded-before-redirect) | — | — |
| [Restore input focus](operations/restore-input-focus.md) | Re-focus the last bound control on the client after a postback | `PreRender` when a bound control ID is in session | `Session("focuscontrol")`, bound control type name | Startup script that restores (and optionally selects) focus | [BR-MVC-027](business-rules.md#br-mvc-027-focus-is-restored-to-the-last-bound-control-by-control-family), [BR-MVC-028](business-rules.md#br-mvc-028-focus-restoration-failures-never-break-the-page) | — | — |
| [Validate and write the model](operations/validate-and-write-model.md) | Gate persistence behind validation | `clsControllerBase.Write` / `clsModelBase.Write` | Derived model state | `WriteData` result, or `False` when validation fails | [BR-MVC-029](business-rules.md#br-mvc-029-a-model-is-written-only-after-its-own-validation-succeeds) | — | — |

## Process flow diagram
The following diagram visualizes the primary operational flow across operations.

```mermaid
flowchart TD
	Start([Browser request]) --> Init[Initialize a request]
	Init --> Sec[Establish security principal]
	Sec --> Menu[Enforce menu-based page authorization]
	Menu --> Decision{Authorized?}
	Decision -->|No| Deny([Redirect to login screen])
	Decision -->|Yes| Model[Model.Pre_Init + Load]
	Model --> Ctx[Receive inbound cross-application context]
	Ctx --> Retrieve[Harvest posted control values]
	Retrieve --> Nav[Navigate to a view]
	Nav --> Persist[Persist context rows]
	Persist --> EndOk([Response rendered / redirected])
```

## Inherited operations and processes

Operations in this section originate from base classes or services provided by dependency framework libraries. They are inherited or delegated, not implemented in this library. This library does not itself derive from `clsBusinessBase`, but the run's library-density scan surfaced the base class in this library's dependency chain (`SAIF.Business.Menu`'s object model derives from it); the entries below are recorded for cross-layer traceability rather than as operations this library performs.

### From `clsBusinessBase` (`SAIF.Framework.Core`)

| Operation | Intent | Provided by | Origin | Embedded in |
| --- | --- | --- | --- | --- |
| Business object edit lifecycle | Snapshot, restore, and commit in-memory object edits through `BeginEdit()`, `CancelEdit()`, and `ApplyEdit()`† | `clsBusinessBase` | `SAIF.Framework.Core` | Not embedded in this library — cross-layer context only; this library defines no BOF business objects* |
| Business object save lifecycle | Persist root or child business objects through the framework `Save()` and `SaveChild()` pipeline† | `clsBusinessBase` | `SAIF.Framework.Core` | Not embedded in this library — cross-layer context only; this library defines no BOF business objects* |

> **Origin**: These operations are defined in `SAIF.Framework.Core` / `clsBusinessBase` and are documented here only because `SAIF.Business.Menu`, a direct dependency of this library, derives from `clsBusinessBase`. This library's own controller/model classes are not `clsBusinessBase`-derived business objects and do not call these operations.

## Database interactions

The following table summarizes which operations read from or write to the database. Per-step SQL and table citations live in each operation's detail page under `operations/`.

| Operation | SQL | Tables | Type |
| --- | --- | --- | --- |
| [Navigate to a view](operations/navigate-to-view.md) | [SQL-001](sql/SQL-001-insert-context-row.md) | [Context](database-tables.md#context) | Write |
| [Navigate with a fresh model](operations/navigate-with-fresh-model.md) | [SQL-001](sql/SQL-001-insert-context-row.md) | [Context](database-tables.md#context) | Write |
| [Receive inbound cross-application context](operations/receive-inbound-context.md) | [SQL-002](sql/SQL-002-retrieve-context-rows.md), [SQL-003](sql/SQL-003-retrieve-context-value-by-name.md) | [Context](database-tables.md#context) | Read |
| [Retrieve and consume context rows](operations/retrieve-context-rows.md) | [SQL-002](sql/SQL-002-retrieve-context-rows.md), [SQL-004](sql/SQL-004-delete-context-rows.md) | [Context](database-tables.md#context) | Read/Delete |
| [Persist context rows](operations/persist-context-rows.md) | [SQL-004](sql/SQL-004-delete-context-rows.md), [SQL-001](sql/SQL-001-insert-context-row.md) | [Context](database-tables.md#context) | Delete/Write |

## Failure and edge-case behavior
- Session timeout on a postback is redirected rather than processed, with the destination depending on whether the caller is on the internal network ([BR-MVC-001](business-rules.md#br-mvc-001-session-timeout-treated-as-an-unprocessable-postback), [BR-MVC-002](business-rules.md#br-mvc-002-internal-users-are-returned-to-the-app-landing-page-on-timeout), [BR-MVC-003](business-rules.md#br-mvc-003-external-users-are-sent-to-the-login-screen-on-timeout)).
- An unauthenticated internal caller receives a 401 NTLM/Basic challenge; an unauthenticated external caller receives a thrown exception routed through central error handling ([BR-MVC-005](business-rules.md#br-mvc-005-unauthenticated-callers-are-challenged-or-refused-by-network-zone)).
- A page not present in the user's authorized menu redirects to the login screen rather than returning a 403 ([BR-MVC-007](business-rules.md#br-mvc-007-page-access-requires-menu-authorization)).
- `Navigate2` throws `ApplicationException` when called without multi-model support enabled ([BR-MVC-011](business-rules.md#br-mvc-011-context-is-persisted-only-on-genuine-cross-app-transitions)).
- Redirect-induced `ThreadAbortException`s are caught and suppressed throughout the framework so they are never mistaken for application errors ([BR-MVC-012](business-rules.md#br-mvc-012-redirect-induced-thread-aborts-are-suppressed)).
- Database timeout and unavailability errors surface a retryable message on the page rather than the generic error page ([BR-MVC-023](business-rules.md#br-mvc-023-database-timeoutunavailable-errors-show-a-retryable-message)).
- Focus-restoration script failures are swallowed by a client-side `try`/`catch` so they never break page rendering ([BR-MVC-028](business-rules.md#br-mvc-028-focus-restoration-failures-never-break-the-page)).

## Related documentation
- [Index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Business rules](business-rules.md)
- [Database tables](database-tables.md)
- [SQL catalog](sql/index.md)
- [Configuration](configuration.md)
- [Security and authorization](security-authorization.md)
- [API reference](api/index.md)

> **Note:** Statements marked with `†` are derived from dependency library documentation via the Legends CLI. Statements marked with `*` were inferred from code structure or contextual evidence. Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- SAIF.Presentation.Web.MVC/clsControllerBase.vb
- SAIF.Presentation.Web.MVC/clsContext.vb
- SAIF.Presentation.Web.MVC/clsModelBase.vb
- SAIF.Presentation.Web.MVC/NavigationContext.vb
- SAIF.Presentation.Web.MVC/ViewPageBase.aspx.vb
