Validate numeric menu context¶
This operation checks whether an incoming postback carries a positive numeric value for a named menu control, used by controllers to decide whether menu-driven navigation context is usable.
| Field | Value |
|---|---|
| Operation ID | OP-CORE-015 |
| Trigger | Controller processing a postback |
| Inputs | Control-value Hashtable, menu control name (default SAIFMenu1) |
| Outputs | Boolean |
| Primary components | clsAppControllerBase.IsValidNumericMenuContext |
| Entry point | SAIF.Presentation.Web.Core.Infragistics111/clsAppControllerBase.vb |
Steps¶
- Return
Falseimmediately when the request is not a postback or the hashtable has no entry for the menu name. (BR-CORE-038) - Return
Trueonly when the menu value is numeric and its string form is greater than"0". (BR-CORE-039)
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([IsValidNumericMenuContext called]) --> D1{IsPostBack AND hashtable has menu-name entry?}
D1 -->|No| R1([Return False])
D1 -->|Yes| D2{"Value is numeric AND string form > '0'?"}
D2 -->|Yes| R2([Return True])
D2 -->|No| R1
Failure and edge-case behavior¶
- The string comparison
> "0"is a string, not numeric, comparison; values whose string form sorts below"0"lexically but are still valid positive numbers could be misclassified depending on formatting.*
Related documentation¶
Sources¶
SAIF.Presentation.Web.Core.Infragistics111/clsAppControllerBase.vb