ClientPageManager

page/manager/ClientPageManager~ ClientPageManager

Page manager for controller on the client side.

Constructor

new ClientPageManager(pageFactory, pageRenderer, stateManager, window, eventBus)

Source:
Initializes the client-side page manager.
Parameters:
Name Type Description
pageFactory PageFactory Factory used by the page manager to create instances of the controller for the current route, and decorate the controllers and page state managers.
pageRenderer PageRenderer The current renderer of the page.
stateManager PageStateManager The current page state manager.
window Window The utility for manipulating the global context and global client-side-specific APIs.
eventBus EventBus The event bus for dispatching and listening for custom IMA events propagated through the DOM.

Members

_eventBus :ima.event.EventBus

Source:
The event bus for dispatching and listening for custom IMA events propagated through the DOM.
Type:
  • ima.event.EventBus

_window :ima.window.Window

Source:
The utility for manipulating the global context and global client-side-specific APIs.
Type:
  • ima.window.Window

Methods

_boundOnCustomEventHandler()

Source:
Event listener for the custom DOM events used by the event bus, bound to this instance.

_handleEventWithController(method, data) → {boolean}

Source:
Attempts to handle the currently processed event bus custom DOM event using the current controller. The method returns true if the event is handled by the controller.
Parameters:
Name Type Description
method string The name of the method the current controller should use to process the currently processed event bus custom DOM event.
data Object.<string, *> The custom event's data.
Returns:
true if the event has been handled by the controller, false if the controller does not have a method for processing the event.
Type
boolean

_handleEventWithExtensions(method, data) → {boolean}

Source:
Attempts to handle the currently processed event bus custom DOM event using the registered extensions of the current controller. The method returns true if the event is handled by the controller.
Parameters:
Name Type Description
method string The name of the method the current controller should use to process the currently processed event bus custom DOM event.
data Object.<string, *> The custom event's data.
Returns:
true if the event has been handled by one of the controller's extensions, false if none of the controller's extensions has a method for processing the event.
Type
boolean

_onCustomEventHandler(event)

Source:
Custom DOM event handler. The handler invokes the event listener in the active controller, if such listener is present. The name of the controller's listener method is created by turning the first symbol of the event's name to upper case, and then prefixing the result with the 'on' prefix. For example: for an event named 'toggle' the controller's listener would be named 'onToggle'. The controller's listener will be invoked with the event's data as an argument.
Parameters:
Name Type Description
event CustomEvent The encountered event bus DOM event.

_parseCustomEvent(event) → {Object}

Source:
Extracts the details of the provided event bus custom DOM event, along with the expected name of the current controller's method for intercepting the event.
Parameters:
Name Type Description
event CustomEvent The encountered event bus custom DOM event.
Returns:
The event's details.
Type
Object

destroy()

Source:

init()

Source:

manage()

Source:

scrollTo()

Source: