Class: Navigator

XV. Navigator

Contains a set of panels for navigating the app and modules within the app.
Navigation within the app is accomplished by elements within the menu tool bar, such as history, search, the back button or logout.
Navigation within modules in the app is accomplished with a list within the panel menu which displays the menu items for each context.
The root menu (module menu) contains the list of modules and the logout.
Only three menus are cached at one time.
Layout: Collapsing Arranger.
Use to implement the high-level container of all business object lists.
Derived from enyo.Panels.
Source:

Extends

  • enyo.Panels
  • XV.ListMenuManager

Members

fetched

Keeps track of whether any list has already been fetched, to avoid unnecessary refetching.
Source:

published :Object

Published fields
Type:
  • Object
Properties:
Name Type Description
modules Array A DOM-free representation of all of the modules contained in the navigator. The details of these module objects will inform the creation of the panel components.
panelCache Object A hashmap of cached panels where the key is the global ID of the panel and the value is the enyo panel component.
Source:

Methods

backTapped()

The back button is a logout button if you're at the root menu. Otherwise it's a back button that takes you to the root menu.
Source:

buildLayout()

If there is a parameter widget, send the current list to the layout form to build the list of columns.
Source:

buildMenus()

If we're on the main menu, then use the navigator actions defined in its `actions` property. If we're in a module, then use the module's actions.
Source:

cachePanels()

The navigator only keeps three panels in the DOM at a time. Anything extra panels will be periodically cached into the panelCache published field and removed from the DOM.
Source:

changeLayout()

When a new column value is selected in the layout panel, this value replaces the old attribute value in the list field.
Source:

exportList()

Exports the contents of a list to CSV. Note that it will export the entire list, not just the part that's been lazy-loaded. Of course, it will apply the filter criteria as selected. Goes to the server for this. Avoids websockets or AJAX because the server will prompt the browser to download the file by setting the Content-Type of the response, which is not possible with those technologies.
Source:

fetch()

Fetch a list.
Source:

itemTap()

Drills down into a workspace if a user clicks a list item.
Source:
This function is called when a module is selected. If the selection is valid, then the list of panels is shown for that module.
Source:

modulesChanged()

Handles additive changes only
Source:

newRecord()

Fired when the user clicks the "New" button. Takes the user to a workspace backed by an empty object of the type displayed in the current list.
Source:

openExportTab()

If a reportSelectList is needed, here it is. This will open a browser tab for the first report and new windows for the other reports. reportSelectList: function (inSender, inEvent) { var list = this.$.contentPanels.getActive(), selected = list.getSelection().getSelected(); _.each(selected, function (value, index) { var model = list.getModel(index), modelName = model.editableModel || model.recordType, reportName = modelName.suffix(), details = { nameSpace: modelName.prefix(), type: modelName.suffix(), id: model.id, name: reportName, culture: XT.locale.culture }; // sending the locale information back over the wire saves a call to the db console.log("printing id: " + model.id); window.open(XT.getOrganizationPath() + "/report?details=%@".f(JSON.stringify(details)), "Print: " + model.id); }); return true; },
Source:

panelTap()

This function is called when a panel is selected. If the selection is valid, then the content panel is set for that panel selection.
Source:

setActiveIconButton()

Determines whether the advanced search or the history icon (or neither) is lit.
Source:

setContentPanel()

Renders a list and performs all the necessary auxilliary work such as hiding/showing the advanced search icon if appropriate. Called when a user chooses a menu item.
Source:

setHeaderContent()

The header content typically describes to the user the particular query filter in effect.
Source:

setupModuleMenuItem()

Renders a list of modules from the root menu.
Source:

setupPanelMenuItem()

Renders the leftbar list of objects within a given module. This function is also called when a leftbar item is tapped, per enyo's List conventions.
Source:

showError()

Error notification, using XV.ModuleContainer notify mechanism
Source:

showHistory()

Displays the history panel.
Source:

showMyAccount()

Displays the My Account popup.
Source:

showParameters()

Displays the advanced search panel.
Source: