Skip to content

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

  1. Save the current context value into Session("CVTextBox" & ViewID) and remove the accordion from the navigation panel. Enforces BR-MENU-032.
  2. If the toggle image currently reads "Expand", switch it to apps-minus.gif/"Collapse", set ShowApps to true, rebuild the accordion (see Render the applications accordion) and re-select the category. Otherwise switch to apps-plus.gif/"Expand" and set ShowApps to false. Enforces BR-MENU-033, BR-MENU-034.
  3. If preferences are available, store SHOWAPPS = Y/N at PrefScope.AppLevel and call Save(). Enforces BR-MENU-035.
  4. No SQL here — clsPreferences in SAIF.Presentation persists the value through SAIF.Framework.Preferences to Oracle (DB user CLM).
    • If Preferences is Nothing (identity not in DOMAIN\user form), the expand/collapse choice is applied for the current render only and is not persisted. Enforces BR-MENU-043.

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 clsPreferences instance available: the toggle still works for the current page, but the choice is lost on the next session (BR-MENU-043).

Sources

  • SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenu.vb