Methods
(static) beforeViewClose(_paramsopt) → {dynamic}
Router: this view is about to be permanently destroyed.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
_params | object | <optional> | {} |
- Source
- Type:
- dynamic
(static) handleFocus(dataopt) → {boolean}
Router: take remote focus. The router also calls this with routerFocused = false when focus LEFT its outlet (to the overhang, a dialog or AppWaitHost). Taking focus then would steal it back, so that notice is ignored while another node holds focus. The call right after the view is shown always takes focus, and a stranded focus (on the bare scene) is still recovered. Screens override restoreScreenFocus, not this.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
data | object | <optional> | {} |
- Source
- Type:
- boolean
(static) hideCovered() → {void}
JRScene's screen swap: the view that covers this one has opened. Hide this view and, if the router suspended it, run onScreenHidden. A view the router CLOSED instead (back, a cleared stack) already ran onScreenHidden in beforeViewClose, so it is only hidden.
- Source
- Type:
- void
(static) isFocusHeldElsewhere() → {boolean}
True when a node outside the bare scene holds focus. The scene itself holding it (or nothing) means focus is stranded.
- Source
- Type:
- boolean
(static) onDestroy() → {void}
Function called when the screen is being permanently removed by SceneManager Override this to clean up resources: task nodes, observers, large data structures Parent components are responsible for calling onDestroy() on children that need it
Floor for screens that DON'T override onDestroy(): abandon any pending fetchAsync promises so a late pool response can't fire into the destroyed node. Screens that override onDestroy() get this via the auto-abandon-promises BSC plugin (it injects abandonApiPromises() into their own onDestroy). SG component onDestroy does not chain to this base.
- Source
- Type:
- void
(static) onScreenHidden() → {void}
Function called when the screen is hidden by the screen manager It is expected that screens override this function if required, to handle focus any actions required on the screen being hidden
- Source
- Type:
- void
(static) onScreenShown() → {void}
Function called when the screen is displayed by the screen manager It is expected that screens override this function to handle focus managmenet and any other actions required on screen shown
- Source
- Type:
- void
(static) onViewOpen(_paramsopt) → {dynamic}
Router: this view has become active for the first time. Publish it as the active routed view BEFORE onScreenShown so JRScene's overhang controller and main.bs's playback-event observer-attach react to the right node. Screens that need route data read m.top.route (routeParams / queryParams / context) inside their own onScreenShown / onRouteUpdate overrides.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
_params | object | <optional> | {} |
- Source
- Type:
- dynamic
(static) onViewResume(_paramsopt) → {dynamic}
Router: a previously-suspended view has returned to the top of the stack (goBack uncovered it). Re-publish it as the active routed view, then restore via onScreenShown.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
_params | object | <optional> | {} |
- Source
- Type:
- dynamic
(static) onViewSuspend(_paramsopt) → {dynamic}
Router: a new view is being pushed on top of this one (still alive). Save focus the same way SceneManager.pushScene does so it can be restored.
The view is still on screen here: every route suspends with "show", and the incoming view opens several message-loop turns later. So onScreenHidden waits for hideCovered, which JRScene calls in the step the incoming view opens; anything it changes on screen then changes in the same render pass as the swap.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
_params | object | <optional> | {} |
- Source
- Type:
- dynamic
(static) restoreScreenFocus() → {void}
Where this screen takes focus. Mirrors onScreenShown's focus rule (restore the saved descendant, else focus the view root). Screens that restore focus differently override this.
- Source
- Type:
- void
(static) saveLastFocus() → {void}
Walk the focus chain to the deepest focused descendant and remember it in m.top.lastFocus. Lifted from SceneManager.pushScene's focus-save loop.
- Source
- Type:
- void