Tab selection¶
This operation covers tab-selection behavior across the library's two structurally independent tab-bar implementations: the declarative SAIFTabBar (markup-persisted tab collection) and the imperative SAIFTabs (code-driven AddTab/InsertTab/RemoveTab)*.
| Field | Value |
|---|---|
| Operation ID | OP-V2-TABS-001 |
| Trigger | Tab LinkButton click (postback). |
| Inputs | SAIFTabBarTabCollection (declarative) or ArrayList of TabSettings (imperative). |
| Outputs | Updated tab selection state; TabClicked event (SAIFTabBar) or BeforeSelectedIndexChanged/SelectedIndexChanged events (SAIFTabs). |
| Primary components | SAIFTabBar.RaiseTabClickedEvent, SAIFTabBar.CreateChildControls, SAIFTabBar.RenderControl; SAIFTabs.LinkButtonClick. |
| Entry point | SAIF.Presentation.Web.Controls.V2\SAIFTabBar.vb, SAIF.Presentation.Web.Controls.V2\SAIFTabs.vb |
Steps¶
SAIFTabBar (declarative)¶
CreateChildControlssorts_Tabs(byOrder, thenText, via the genericSorter(Of SAIFTabBarTab)), builds one<li><LinkButton></li>per tab, and wiresAddHandler lb.Click, AddressOf RaiseTabClickedEvent.- On click,
RaiseTabClickedEvent: - Deselects all tabs when
Mode = TabBarMode.TabBar(mutually exclusive selection) (BR-V2-006). - Selects the clicked tab.
- Raises the public
TabClickedevent. RenderControlapplies CSS classes (Selected,SelectedSibling,Disabled,DisabledSelected) depending on tab state andMode(TabBarvs.WizardTabBar).
SAIFTabs (imperative)¶
- Consuming pages call
AddTab/InsertTab/RemoveTabto build the tab list (ArrayListofTabSettings). LinkButtonClick(wired per rendered link) matches the clicked link'sClientIDagainst tab entries.- Raises
BeforeSelectedIndexChanged(cancelable viaSAIFTabEventArgs.Cancel) — allowing the host page to intercept/cancel the tab switch. -
If not canceled: raises
SelectedIndexChanged, allowing the host page to coordinate visibility of the tab-associated content panel (DivID). -
Delegation: None into referenced libraries in either implementation; purely local control-tree logic.
Process flow¶
The following diagram visualizes the SAIFTabBar selection flow only; see the "SAIFTabs (imperative)" steps above for the separate, structurally different flow used by SAIFTabs (ClientID matching and a cancelable BeforeSelectedIndexChanged/SelectedIndexChanged pair, with no Mode-based deselection or CSS-state rendering step).
flowchart TD
Start([Tab LinkButton click]) --> Mode{Mode = TabBar?}
Mode -->|Yes| Deselect[Deselect all other tabs]
Mode -->|No, WizardTabBar| Skip[Skip deselection]
Deselect --> Select[Select clicked tab]
Skip --> Select
Select --> Raise[Raise TabClicked event]
Raise --> Render[RenderControl applies CSS classes per tab state]
Failure and edge-case behavior¶
SAIFTabBarRenderControlwraps its rendering logic in aTry/Catchthat writes the exception message, source, and stack trace directly to the output stream on failure — an unusual error-surfacing pattern for a production control*.- Whether both
SAIFTabBarandSAIFTabsremain actively consumed by downstream applications, or one is deprecated, could not be determined from this library alone**.
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.
Related documentation¶
Sources¶
- SAIF.Presentation.Web.Controls.V2\SAIFTabBar.vb
- SAIF.Presentation.Web.Controls.V2\SAIFTabs.vb
- SAIF.Presentation.Web.Controls.V2\TabSettings.vb