ResetFrontendOnMenuItemClickFrontendCoordinationRule
A rule that responds to system UI menu items being clicked by opening TaskPanels or by cleaning up the stack of existing ones. Depending on the state and behaviour of available Frontends, this rule behaves in the following manner:
If the menu item's Frontend has a HomePanel, all Frontends' TaskPanels will be closed in order to show the HomePanel.
If the menu item's Frontend has exactly one TaskPanel active, nothing happens.
If the menu item's Frontend has more than one TaskPanel active, all except the first one will be closed, resetting the Frontend state.
If the menu item's Frontend did not yet have a TaskPanel active, Frontend.openTaskPanels will be called in order to open one (or more).
Note that this rule does not close other Frontends' TaskPanels after calling Frontend.openTaskPanels. Enforcing only a single active TaskPanel stack can be independently configured, for example through SingleTaskPanelStackFrontendCoordinationRule.
Parameters
A function that allows the rule to get a Frontend (creating it if it wasn't yet) based on the clicked MenuItem.Id. May return null
when no Frontend belonging to the MenuItem.Id was present in the system UI FrontendRegistry.
Constructors
Functions
Actives the rule within the scope of the given lifecycleOwner.