Harvest posted control values¶
Gives every derived screen its posted control values without per-control wiring. This operation recognizes both standard ASP.NET controls and vendor/SAIF controls purely by their type name, so the framework takes no compile-time dependency on the vendor assemblies.
| Field | Value |
|---|---|
| Operation ID | OP-MVC-09 |
| Trigger | Page_Load → CallRetrieve |
| Inputs | The page's control tree |
| Outputs | Hashtable of control values keyed by control ID, passed to the derived Retrieve |
| Primary components | clsControllerBase.CallRetrieve → GetInControls |
| Entry point | SAIF.Presentation.Web.MVC/clsControllerBase.vb |
Steps¶
- Walk the page's control tree recursively, descending into any control that
HasControls(BR-MVC-020). - For each control, switch on the upper-cased type name and read its value:
TextBox.Text(inside a swallowingTry),DropDownList.SelectedValue,ListBox.SelectedValue,CheckBox.Checked,RadioButton.Checked(BR-MVC-020). - On failure (
TextBox.Textread): the exception is swallowed and processing continues with the next control. - For Infragistics editors (
WEBCURRENCYEDIT,WEBDATETIMEEDIT,WEBMASKEDIT,WEBNUMERICEDIT,WEBTEXTEDIT) andWEBDATECHOOSER, read theTextproperty reflectively and trim it (BR-MVC-020, BR-MVC-021). - For
WEBCOMBO, readDisplayValuereflectively; forSAIFMENU, readContextValue(BR-MVC-021). - If a control's type name matches none of the recognized cases: the control is silently skipped and contributes no entry to the value map.
- Store each value in the hashtable keyed by control ID, then call the derived
Retrieve(controlValues, Context.GetContext("targetView")).
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([CallRetrieve]) --> S1[Walk control tree recursively]
S1 --> S2{Recognized standard control type?}
S2 -->|Yes| S3[Read value via type-specific property]
S2 -->|No| S4{Recognized vendor/SAIF control?}
S4 -->|Yes| S5[Read value reflectively]
S4 -->|No| S6[Skip control]
S3 --> S7[Store in hashtable keyed by control ID]
S5 --> S7
S6 --> S7
S7 --> EndOk([Call derived Retrieve with control values])
Failure and edge-case behavior¶
TextBox.Textreads are wrapped in a swallowingTry, so a failure reading one text box does not abort the harvest of the remaining controls.- Unrecognized control types (custom or third-party controls not in the switch list) are silently ignored rather than raising an error.
Related documentation¶
Sources¶
- SAIF.Presentation.Web.MVC/clsControllerBase.vb