Skip to content

MultiList selection and wildcard behavior

This operation keeps MultiListControl's checkbox list and text box in sync, representing selected items as a semicolon-delimited string, and enforcing mutual exclusivity between a configured wildcard ("All") item and any specific item selections.

Field Value
Operation ID OP-V2-MULTILIST-001
Trigger CheckBoxList.SelectedIndexChanged or TextBox.TextChanged postback.
Inputs Selected checkbox items; typed text; configured WildCardItem.
Outputs Updated text box value (semicolon-delimited selections, or the wildcard value); updated item selection/enabled state.
Primary components MultiListControl.m_CheckList_SelectedIndexChanged, MultiListControl.m_TextBox_TextChanged.
Entry point SAIF.Presentation.Web.Controls.V2\MultiListControl.vb

Steps

  1. m_CheckList_SelectedIndexChanged (checkbox list changed):
  2. If the designated WildCardItem is selected: sets the text box to just the wildcard value and disables all other checkbox items (mutual exclusivity). (BR-V2-004)
  3. Otherwise: concatenates all selected item texts (semicolon-delimited) into the text box and re-enables all items.
  4. Raises the public ListItemSelected event.
  5. m_TextBox_TextChanged (text box changed) mirrors this logic in reverse:
  6. If the typed text contains the wildcard value: sets the text box to just the wildcard text and disables/selects items accordingly.
  7. Otherwise: splits the typed text on ; and marks matching list items as selected.
  8. Raises the public TextChanged event.
  9. LayoutControls (invoked from both CreateChildControls and RenderContents) branches CSS/positioning logic based on Page.Request.Browser.Browser.ToUpper = "FIREFOX" — a legacy browser-sniffing pattern*.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([CheckBoxList or TextBox change]) --> Source{Which control changed?}
    Source -->|CheckBoxList| WildCheck{WildCardItem selected?}
    WildCheck -->|Yes| WildSetText[Set text box to wildcard value, disable other items]
    WildCheck -->|No| ConcatText[Concatenate selected items into text box, enable all items]
    Source -->|TextBox| WildTyped{Typed text matches wildcard?}
    WildTyped -->|Yes| WildSetItems[Set text to wildcard, disable other items, select wildcard]
    WildTyped -->|No| SplitText[Split text on semicolon, select matching items]
    WildSetText --> Done([Raise selection/text-changed event])
    ConcatText --> Done
    WildSetItems --> Done
    SplitText --> Done

Failure and edge-case behavior

  • MultiListControl.LayoutControls branches CSS/positioning logic based on Page.Request.Browser.Browser.ToUpper = "FIREFOX", which may not correctly detect modern Firefox user-agent strings*.
  • The embedded MultiList.js client script (bundled as a WebResource) governs the client-side popup show/hide behavior for the checkbox list; its detailed logic was not independently traced in this operation's analysis*.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • SAIF.Presentation.Web.Controls.V2\MultiListControl.vb