Manage tabs¶
Add, select, style, sort, and persist a collection of navigation tabs. Host page calls AddTab/InsertTab; CreateChildControls for SAIFTabBar; postback for view-state persistence.
| Field | Value |
|---|---|
| Operation ID | OP-V2-011 |
| Trigger | Host page calls AddTab/InsertTab; CreateChildControls for SAIFTabBar; postback for view-state persistence. |
| Inputs | Tab text, client ID, div ID, selected/enabled/visible flags, access key, width, Mode. |
| Outputs | An ordered tab collection, rendered tab links/bar, and selection change events. |
| Primary components | SAIFTabs / SAIFTabBar |
| Entry point | SAIF.Presentation.Web.Controls.V2/SAIFTabs.vb |
Steps¶
SAIFTabs.AddTab/InsertTabcreate aTabSettingsentry (text, client ID, div ID, selected, access key, width, visible, index) and append or insert it into the tab list. (BR-V2-066, BR-V2-067)- When the added tab is selected, capture the prior selected tab and raise
SelectedIndexChangedwith aSAIFTabEventArgscarrying both tabs. (BR-V2-068) SelectedTabreturns the first tab whoseSelectedflag is set, or a new emptyTabSettingswhen none is selected;SelectedTabId,SelectedTabIndexandSelectedTabTextare derived from it. (BR-V2-069, BR-V2-070)SAIFTabs.IsDesignreturnsTruewhen readingPage.Userthrows, which is used to suppress run-time-only behaviour in the designer. (BR-V2-071)SAIFTabBar.CreateChildControlscreates oneLinkButtonper tab and assigns CSS classesSelected,SelectedSibling,DisabledorDisabledSelectedaccording to tab state and position; the bar itself is styledSAIFTabBarorSAIFWizardTabBardepending onMode. (BR-V2-072, BR-V2-073, BR-V2-074)SAIFTabBarpersists its tab collection throughSaveViewState/LoadViewState, and exposesEnableAllTabs,DisableAllTabs,ShowAllTabs,HideAllTabsandTabs.GetTabByIDfor bulk state changes. (BR-V2-075, BR-V2-076)SAIFTabBarTabCollection.Sortuses the reflection-basedSorter(Of T)comparer to order tabs by a named property. (BR-V2-077)
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([AddTab/InsertTab]) --> Create[Create TabSettings entry]
Create --> Sel{Tab selected?}
Sel -->|Yes| Event[Raise SelectedIndexChanged]
Sel -->|No| Bar
Event --> Bar[SAIFTabBar.CreateChildControls]
Bar --> Style[Assign per-tab CSS classes]
Style --> Persist[Persist via SaveViewState/LoadViewState]
Persist --> Done([Tabs rendered])
Failure and edge-case behavior¶
- No exceptional failure handling beyond the branches described in Steps was found in the analysis findings.*
Related documentation¶
Sources¶
SAIF.Presentation.Web.Controls.V2/SAIFTabs.vb