SAIF.Presentation.Web.Binding.Infragistics103 business rules¶
This library does not define or enforce domain/business rules of its own; it is a UI-binding mechanism that surfaces rule violations computed elsewhere (in SAIF.BOF.Framework business objects via IDataErrorInfo/IsValid). The rules below are internal binding/formatting behaviors enforced in code, documented here as rule-like constraints since they govern conditional application behavior.
BR-BIND-001: Error CSS suppression for protected fields¶
Field
Value
Statement
SetControlFormat does not overwrite a control's CSS to an error state if the control's current CssClass is "disabledbackcolor".
Trigger
Validate()/RefreshValidation() calling SetControlFormat(False) on a binder whose control is in error.
Enforcement
clsObjectBinderBase.SetControlFormat checks m_Control.CssClass <> "disabledbackcolor" before applying valid-state CSS; the error branch is unconditional for non-disabled controls.
Outcome
A control marked disabled/protected in the UI is never visually flagged as valid/invalid by the binder.
BR-BIND-002: Grid/list controls exempt from cell-level error/valid CSS¶
Field
Value
Statement
Controls whose type name (case-insensitive) contains "ULTRAWEBGRID", "WEBDATAGRID", or "CHECKBOXLIST" are skipped by the generic CSS error/valid formatting logic.
Trigger
SetControlFormat invoked (valid or error branch) for a binder bound to a grid or checkbox-list control.
Enforcement
clsObjectBinderBase.SetControlFormat checks m_Control.GetType.Name.ToUpper.IndexOf("ULTRAWEBGRID"), .IndexOf("WEBDATAGRID"), and .IndexOf("CHECKBOXLIST") and no-ops the CSS assignment when any of the three substrings is found.
Outcome
Grid and checkbox-list controls never receive the generic single-control error/valid CssClass styling; any error indication for these controls must come from other mechanisms (e.g., row/column error tracking in clsUltraGridBinder).
BR-BIND-003: Multi-line TextBox error styling differs from single-line¶
Field
Value
Statement
For a TextBox in MultiLine mode, the error state applies errorbordercolor; for a single-line TextBox (and other controls), the error state applies errorbackcolor.
Trigger
SetControlFormat(False) invoked for a binder whose control's type name contains "TEXTBOX".
Enforcement
clsObjectBinderBase.SetControlFormat casts the control to WebControls.TextBox and branches on TextMode = WebControls.TextBoxMode.MultiLine.
Outcome
Multi-line text areas are visually flagged with a border-color change rather than a background-color change when in error.
BR-BIND-004: First-error-control precedence during formatting¶
Field
Value
Statement
During Validate()/RefreshValidation(), once m_FirstErrorControl is set, subsequent non-error binders whose control matches that same control are not re-formatted as valid.
Trigger
Iteration of m_Bindings in Validate()/RefreshValidation() reaching a binder with no errors after an earlier binder (same control) recorded the first error.
Enforcement
clsObjectBindManager.Validate/RefreshValidation compares the current binder's control against m_FirstErrorControl before calling SetControlFormat(True), skipping the call on a match.
Outcome
Prevents a later "no error" formatting pass from erasing the visual error indicator applied by the earlier error pass on the same control.
Identical error text strings are added to the manager's aggregate error collection only once.
Trigger
Validate()/RefreshValidation() collecting error messages from multiple binders.
Enforcement
clsObjectBindManager.Validate guards each add with If Not m_Errors.Contains(ErrorText).
Outcome
Avoids repeated display of the same message when multiple binders are bound to the same underlying error (e.g., the same business-object property bound to two controls).
BR-BIND-006: Validation key derivation for SAIF framework objects¶
Field
Value
Statement
For objects recognized as SAIF framework objects (clsBusinessBase/clsBusinessCollectionBase present in the CLR base-type chain), the validation dictionary key is the object's MyGuid property value; for all other objects, the key is the CLR type name uppercased.
Trigger
AddBinder() computing binder.ValidationKey when a binder is registered.
Enforcement
clsObjectBinderBase.ValidationKey calls IsSAIFFrameWorkObject and, if true, reads MyGuid via GetObjectValueAsString; otherwise falls back to ValidationObject.GetType.Name.ToUpper.
Outcome
Determines the key used to track distinct bound objects in clsObjectBindManager.m_ValidationObjects for re-validation (ValidateBindSources).
This library does not itself evaluate business rules; rule outcomes originate in bound SAIF.BOF.Framework business objects and are only surfaced (as CSS formatting and error text) here.
The re-registration behavior of Update(UltraWebGrid, IEnumerable), Update(WebDataGrid, IEnumerable), and Update(DropDownList, Object) (append rather than replace in m_Bindings) is documented as an architectural risk in Architecture and Dependencies, not as a formal business rule, since it was not confirmed as an intentional design choice.*
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.