BindingUtility¶
BindingUtility is the shared, stateless reflection/TypeDescriptor engine underneath every binding operation in this library — AutoBindControlAncestor, BindingManager, and SAIFAJAXControlAncestor all delegate their path resolution and value transfer to it. Every method swallows reflection exceptions internally, which is the root cause of this library's "fail silently on a bad bind path" behavior. (BR-AJAX-005)
Purpose¶
- Resolves a dotted property path (e.g.
Submission.Locations.Primary) segment-by-segment against a root object usingTypeDescriptor, giving the whole library a single, consistent path-walking implementation. (BR-AJAX-004) - Reads and writes a named property's value on a resolved object, underpinning both the bind-to-control and push-back-to-model directions of every auto-bind control.
- Swallows all reflection failures (
Catch … 'gobble') so a mistyped bind path never raises an exception, at the cost of masking configuration errors. (BR-AJAX-005)
Context¶
- Namespace:
SAIF.Presentation.Web.Controls.V2.AJAX - Assembly/package:
SAIF.Presentation.Web.Controls.AJAX.Infragistics111(packaged inSAIF.BOF.Presentation.Web.Infragistics111)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
GetObject |
Shared Function GetObject(root As Object, path As String) As Object |
Walks a dotted path from root, returning the object at the end of the path, or Nothing on any resolution failure (BR-AJAX-004) |
GetObjectValue |
Shared Function GetObjectValue(root As Object, propertyName As String) As Object |
Reads a single named property's value from root via TypeDescriptor, returning Nothing on failure |
SetObjectValue |
Shared Sub SetObjectValue(root As Object, propertyName As String, value As Object) |
Writes a value to a single named property on root via TypeDescriptor, silently doing nothing on failure |
BindValue |
Shared Function BindValue(root As Object, path As String, propertyName As String) As Object |
Combines GetObject and GetObjectValue to resolve a full BindSource/BindProperty pair in one call |
Behavioral notes¶
- Every method here wraps its reflection logic in a
Try/Catchthat discards the exception entirely, so callers cannot distinguish "path resolved toNothing" from "path resolution threw" — both look identical to the caller. (BR-AJAX-005) - Because failures are silent, a misconfigured
BindSource/BindPropertyproduces no error and no audit trail — a page can appear to save successfully while a value was never actually written.*
Constraints and usage notes¶
- All property resolution goes through
System.ComponentModel.TypeDescriptor, so bound properties must be discoverable by the standard component model (public properties work; properties hidden fromTypeDescriptorwill not resolve). - Consumers relying on this helper for anything other than the auto-bind controls in this library should be aware that binding errors are invisible by design.
Related documentation¶
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.AJAX.Infragistics111/BindingUtility.vb