Skip to content

SAIFWarp pre-render error/init script registration

This operation runs during the PreRender phase of the ASP.NET page lifecycle for a SAIFWarp control, wiring the central async-refresh error-handling behavior and registering the progress-indicator initialization script.

Field Value
Operation ID OP-SAIFWARP-PRERENDER
Trigger ASP.NET PreRender event of SAIFWarp
Inputs Page context
Outputs Registered startup/client scripts, ClientSideEvents.Error wiring
Primary components SAIFWarp.SAIFWarp_PreRender, SAIFWarp.GetScriptWithMessage
Entry point SAIF.Presentation.Web.Controls.Infragistics103\SAIFWarp.vb

Steps

  1. If Not DesignMode: set ClientSideEvents.Error = ERROR_SCRIPT_BLOCK_NAME.
  2. If the ERROR_SCRIPT_BLOCK_NAME startup script is not already registered, register it with the message produced by GetScriptWithMessage(DEFAULT_ERROR). This script (SAIFWarp_Error) navigates the browser to /weberror/processError.aspx?MSG={message} when the async-refresh error flags value is greater than 1 (BR-4).
  3. On failure (flags > 1): the browser navigates away from the async panel context to the shared error-handling screen.
  4. If the INIT_SCRIPT_NAME client script block is not already registered, register INIT_SCRIPT, which defines WARP_Init — sets the panel's progress-indicator image URL to /Resources/Images/saif_progressIndicator.gif.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([PreRender event fires]) --> Design{DesignMode?}
    Design -->|No| SetError[Set ClientSideEvents.Error]
    Design -->|Yes| SkipError[Skip error wiring]
    SetError --> CheckErr{Error script already registered?}
    SkipError --> CheckErr
    CheckErr -->|No| RegErr[Register SAIFWarp_Error startup script]
    CheckErr -->|Yes| CheckInit
    RegErr --> CheckInit{Init script already registered?}
    CheckInit -->|No| RegInit[Register WARP_Init client script]
    CheckInit -->|Yes| EndOk
    RegInit --> EndOk([PreRender complete])

Failure and edge-case behavior

  • flags > 1 on the client-side async-refresh error event: browser navigates to /weberror/processError.aspx?MSG={message} per BR-4.
  • At design time, the error ClientSideEvents wiring is skipped.

Sources

  • SAIF.Presentation.Web.Controls.Infragistics103\SAIFWarp.vb