Skip to content

Handle a toolbar click

Map a clicked toolbar icon to its logical ToolBarButton action and raise the corresponding event(s) for the host page. This operation is implemented by SAIFMenuTop.MenuImage_Click.

Field Value
Operation ID OP-MENU-016
Trigger SAIFMenuTop.MenuImage_Click, the Click event of a toolbar SAIFImageButton.
Inputs Clicked control's ID.
Outputs ToolbarClick(ToolBarButton); DefaultOnSubmit(); MenuNavigate("", "Help") (help icon only).
Primary components SAIFMenuTop.MenuImage_Click
Entry point SAIF.Presentation.Web.Controls.V2.Menu/SAIFMenuTop.vb

Steps

  1. Map the clicked icon ID to the matching ToolBarButton value and raise ToolbarClick. Enforces BR-MENU-075.
  2. imgTopDefaultOnSubmit raises DefaultOnSubmit() instead. Enforces BR-MENU-050.
  3. mnuHelp raises both ToolbarClick(Help) and MenuNavigate("", "Help"). Enforces BR-MENU-076.
    • Note: visibility/enabled guards around each toolbar event are present only as commented-out code and are therefore not enforced — a click on a disabled-but-rendered icon still raises the event. Enforces BR-MENU-077.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start(["SAIFMenuTop.MenuImage_Click, the Click event"]) --> Which{Which icon?}
    Which -->|Standard toolbar icon| Map["Map icon ID to ToolBarButton value"]
    Map --> RaiseClick(["Raise ToolbarClick(ToolBarButton)"])
    Which -->|imgTopDefaultOnSubmit| Default(["Raise DefaultOnSubmit()"])
    Which -->|mnuHelp| Help(["Raise ToolbarClick(Help) and MenuNavigate("", "Help")"])
    RaiseClick --> NoGuard(["No visibility/enabled re-check; guards are commented out"])

Failure and edge-case behavior

  • A postback targeting a hidden/disabled toolbar icon still raises its event; the handler performs no server-side re-validation (BR-MENU-077).

Sources

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