---
title: Navigate with a fresh model
summary: Constructs a brand-new model/view-data pair under a new GUID for a multi-model window, then delegates to Navigate.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.MVC
reference_type: package
operation_id: OP-MVC-04b
trigger: Derived controller opens a new logical window/instance under multi-model support
---

# Navigate with a fresh model

A variant of [Navigate to a view](navigate-to-view.md) that first builds an entirely new model and view-data instance — used when a screen needs to open a logically independent window (for example, a second claim window) rather than reuse the current model.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-MVC-04b |
| **Trigger** | Derived controller opens a new logical window/instance under multi-model support |
| **Inputs** | `SupportsMultiModel`, factory-built model, current `ViewData` |
| **Outputs** | New model/view data stored under a new GUID in session; delegates to Navigate |
| **Primary components** | `clsControllerBase.Navigate2` |
| **Entry point** | SAIF.Presentation.Web.MVC/clsControllerBase.vb |

## Steps

1. If `SupportsMultiModel` is false, throw `ApplicationException("Navigate2 only supported with Multiple Model configuration.")` ([BR-MVC-011](../business-rules.md#br-mvc-011-context-is-persisted-only-on-genuine-cross-app-transitions)).
   - On failure: exception propagates to the caller — no model/context is created.
2. Build a new model from the factory, assign a new `clsSecurityPrincipal(Platform.Web)` and the application name, and call `Pre_Init()`.
3. Call the overridable `OnNewModel(newModel, newViewData)`.
   - If it returns `False`: abandon the navigation and return `False` — no session state is written and Navigate is not called.
4. Copy all current `ViewData` entries into the new view data, call `newModel.UnInitialize()`, and store both under a new GUID (`<guid>-model`, `<guid>-viewdata`) in session ([BR-MVC-008](../business-rules.md#br-mvc-008-multi-model-view-state-is-keyed-by-a-per-view-guid)).
5. Delegate to `Navigate(...)` passing the new GUID as `inNewModel`.
   - Embeds [Navigate to a view](navigate-to-view.md), including its cross-application context persistence to [Context](../database-tables.md#context) via [SQL-001](../sql/SQL-001-insert-context-row.md).

> **Origin**: Step 5 is implemented in [`Navigate to a view`](navigate-to-view.md) (`clsControllerBase.Navigate`, this library) and executed on behalf of this operation.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([Navigate2 called]) --> D1{SupportsMultiModel?}
	D1 -->|No| EndErr([Throw ApplicationException])
	D1 -->|Yes| S1[Build new model, new SecurityPrincipal, Pre_Init]
	S1 --> S2[OnNewModel]
	S2 --> D2{Returned False?}
	D2 -->|Yes| EndAbandon([Return False])
	D2 -->|No| S3[Copy ViewData, UnInitialize old, store under new GUID]
	S3 --> S4[Delegate to Navigate]
	S4 --> EndOk([Navigate result returned])
```

## Failure and edge-case behavior
- Calling this operation without multi-model support enabled is a hard configuration error (`ApplicationException`), not a silent no-op.
- A derived `OnNewModel` override can veto the navigation entirely by returning `False`, before any session state changes are made.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Database tables](../database-tables.md)

## Sources
- SAIF.Presentation.Web.MVC/clsControllerBase.vb
