Skip to content

clsAppControllerBase

clsAppControllerBase is the application-level controller base that every SAIF MVC-triad controller in a consuming application inherits from. It extends clsControllerBase (from SAIF.Presentation.Web.MVC) with application conventions: a standard WriteStatus result vocabulary, the SAIFMENU control-name constant used to correlate menu postbacks, and IsValidNumericMenuContext, which decides whether a postback carries a usable numeric menu-context value before the controller proceeds with menu-driven logic.

Purpose

  • Provide a shared, three-state (Failure/NoChanges/Successful) result vocabulary (WriteStatus) so all application controllers report write outcomes consistently.
  • Name the menu control (SAIFMENU) that postback validation looks up in the control-value hashtable.
  • Determine whether an incoming postback carries a positive numeric menu-context value for the named menu control, so controllers can decide whether menu-driven navigation context is usable. (BR-CORE-038, BR-CORE-039)

Context

  • Namespace: SAIF.Presentation.Web.Core
  • Assembly/package: SAIF.Presentation.Web.Core.Infragistics111 (merged into SAIF.Presentation.Web.Infragistics111.dll via SAIF.BOF.Presentation.Web.Infragistics111.nuspec)

Public members

Member Signature Purpose
WriteStatus Public Enum WriteStatus As Integer (Failure = -1, NoChanges = 0, Successful = 1) Standard three-state vocabulary consuming controllers use to report the outcome of a write/save operation.
SAIFMENU Public Const SAIFMENU As String = "SAIFMenu1" Default control name used to locate the menu control's postback value inside a control-value hashtable.
IsValidNumericMenuContext(controlValues, menuControlName) Public Function IsValidNumericMenuContext(controlValues As Hashtable, Optional menuControlName As String = "SAIFMenu1") As Boolean Returns False immediately when the request is not a postback or the hashtable has no entry for the menu name; otherwise returns True only when the menu value is numeric and its string form is greater than "0".

Behavioral notes

  • IsValidNumericMenuContext's positivity check compares the value's string form against the literal "0" rather than performing a numeric comparison, which is a string, not numeric, comparison.*

Constraints and usage notes

  • Consuming controllers must supply a Hashtable of control values (not a raw NameValueCollection) for IsValidNumericMenuContext to evaluate.
  • The default menuControlName ("SAIFMenu1") assumes the standard SAIF menu control naming convention; controllers using a differently named menu control must pass the override argument.

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.Core.Infragistics111/clsAppControllerBase.vb