Class: AbstractPages

js-whatever/js/abstract-pages. AbstractPages

new AbstractPages()

Abstract base class for representing groups of pages

Source:

Extends

  • Backbone.View

Members

<abstract> router

Backbone.Router instance which is observed for navigation events

Source:

<abstract> vent :module:js-whatever/js/vent-constructor.Vent

Instance of Vent used for navigation

Type:
Source:

Methods

buildRoute(page) → {String}

Parameters:
Name Type Description
page String

The page object

Source:
Returns:

The current route for a given page

Type
String

changePage(pageName)

Change to the named page. This will call it's render method if this hasn't already been called,
and hide the current page

Parameters:
Name Type Description
pageName String

The name of the page

Source:

findPage(pageName) → {Object}

Parameters:
Name Type Description
pageName String

The name of the page

Source:
Returns:

The page object with the given name

Type
Object

<abstract> initializePages()

Sets the value of this.pages to the list of page objects.
These must have a pageName and a constructor function.
The constructors should extend BasePage
A page marked with defaultPage will be used if the given page is not found.

Source:
Example
this.pages = [{
    constructor: Foo,
    pageName: 'foo'
}, {
    constructor: Bar,
    defaultPage: true,
    pageName: 'bar'
}]

Navigate to the named page, showing it and using the vent to propagate the navigation

Parameters:
Name Type Description
pageName String

The name of the page

Source:
Copyright 2013-2018 Micro Focus International plc. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
Documentation generated by JSDoc 3.4.3 on Thu Jun 21st 18:04 2018 using the DocStrap template.