Expand or collapse the applications section¶
Toggle the applications accordion between expanded and collapsed, and persist the user's choice. This operation is implemented by SAIFMenu.ExpandClick.
| Field | Value |
|---|---|
| Operation ID | OP-MENU-006 |
| Trigger | Clicking the expand/collapse toggle icon (SAIFMenu.ExpandClick). |
| Inputs | Current ContextValue; current ShowApps state; Preferences (may be Nothing). |
| Outputs | Rebuilt or removed accordion; updated ShowApps; persisted SHOWAPPS preference. |
| Primary components | SAIFMenu.ExpandClick |
| Entry point | SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenu.vb |
Steps¶
- Save the current context value into
Session("CVTextBox" & ViewID)and remove the accordion from the navigation panel. Enforces BR-MENU-032. - If the toggle image currently reads "Expand", switch it to
apps-minus.gif/"Collapse", setShowAppsto true, rebuild the accordion (see Render the applications accordion) and re-select the category. Otherwise switch toapps-plus.gif/"Expand" and setShowAppsto false. Enforces BR-MENU-033, BR-MENU-034. - If preferences are available, store
SHOWAPPS=Y/NatPrefScope.AppLeveland callSave(). Enforces BR-MENU-035. - No SQL here —
clsPreferencesinSAIF.Presentationpersists the value throughSAIF.Framework.Preferencesto Oracle (DB userCLM). -
- If
PreferencesisNothing(identity not inDOMAIN\userform), the expand/collapse choice is applied for the current render only and is not persisted. Enforces BR-MENU-043.
- If
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start(["Clicking the expand/collapse toggle icon (SAIFMenu.ExpandClick)"]) --> Save["Save context value to Session and remove accordion"]
Save --> Check{Toggle image reads Expand?}
Check -->|Yes| Expand["Switch to apps-minus.gif / Collapse, set ShowApps=true"]
Expand --> Rebuild["Rebuild accordion and re-select category"]
Check -->|No| Collapse["Switch to apps-plus.gif / Expand, set ShowApps=false"]
Rebuild --> Pref{Preferences available?}
Collapse --> Pref
Pref -->|Yes| SavePref["Store SHOWAPPS at PrefScope.AppLevel and Save()"]
Pref -->|No| Transient(["Choice applied for current render only"])
SavePref --> End(["Rebuilt or removed accordion; updated ShowApps"])
Failure and edge-case behavior¶
- No
clsPreferencesinstance available: the toggle still works for the current page, but the choice is lost on the next session (BR-MENU-043).
Related documentation¶
Sources¶
SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenu.vb