Skip to content

SAIFMessage

SAIFMessage is a CompositeControl that displays page status text alongside an automatically selected icon (error/warning/complete), derived from keywords in the message text, so consuming pages get consistent status-message iconography without manually choosing an image (BR-V2-005).

Purpose

  • Present a message with a consistent icon convention understood across the SAIF UI (error/warning/complete), driven by keyword scanning of the message text.
  • Allow the caller to explicitly override the auto-selected icon via DisplayImage when needed.
  • Support both full-page and partial (AJAX) postback scenarios, including client-side message updates.

Context

  • Namespace: SAIF.Presentation.Web.Controls.V2
  • Assembly/package: Compiled into SAIF.BOF.Presentation.Web.Infragistics103*

Public members

Member Signature Purpose
Images (nested Enum) Public Enum Images (DefaultImage, CompleteImage, ErrorImage, WarningImage) Identifies which icon variant is currently selected/displayed.
Text Public Property Text As String The message text displayed; setting it triggers SetImage's keyword scan on next render per BR-V2-005.
DisplayImage Public Property DisplayImage As Images Gets or explicitly overrides the currently selected icon; when left at DefaultImage, the control auto-selects the icon from Text keywords.

Inherited public members

SAIFMessage inherits from CompositeControl (System.Web.UI.WebControls), a framework base class rather than a documented SAIF dependency library.

Member Signature Purpose
AccessKey Public Property AccessKey As String Keyboard shortcut character used to move focus to the rendered message container.
Attributes Public ReadOnly Property Attributes As AttributeCollection Collection of arbitrary HTML attributes rendered on the control's outer tag.
CssClass Public Property CssClass As String CSS class name(s) rendered on the control's outer tag.
Controls Public ReadOnly Property Controls As ControlCollection Child controls collection containing the internal icon and label controls.
Enabled Public Property Enabled As Boolean Controls whether the composite control participates in enabled-state behavior.
Height Public Property Height As Unit Height of the rendered message container.
Width Public Property Width As Unit Width of the rendered message container.
SkinID Public Property SkinID As String Theme skin identifier applied when ASP.NET themes are in use.
Style Public ReadOnly Property Style As CssStyleCollection Inline CSS style declarations rendered on the outer tag.
ToolTip Public Property ToolTip As String Text shown as a native tooltip when hovering the rendered element.
Visible Public Property Visible As Boolean Determines whether the message container renders at all.

Standard CompositeControl/Control members (ID, ClientID, Controls, Visible, DataBind, FindControl, etc.) are not re-documented here as they are unmodified framework behavior**.

Behavioral notes

  • RenderControl renders a small table with the icon in one cell and the message label in the next; in design mode it always shows the complete icon.
  • When Text is empty, the control marks itself with an IsImageSet="false" attribute and hides itself via inline style, signaling to Message.js (not present in this project) that no server-set image applies.
  • SetImage implements the keyword-scan logic described in Message icon selection.

Constraints and usage notes

  • Requires Message.js to be deployed at /Resources/Scripts/Controls/Message.js for correct client-side behavior across full and partial postbacks; its detailed logic could not be verified from this library's source**.
  • Icon image URLs (MsgError.png, MsgWarning.png, MsgComplete.png) are hardcoded to /Resources/Images/.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Presentation.Web.Controls.V2\SAIFMessage.vb