Module: alfresco/services/NavigationService

alfresco/services/NavigationService

Handles requests to redirect the browser to display different pages in either current or the new tab.
Author:
  • Dave Draper
  • David Webster
License:
Source:

Members

subscriptions :object[]

It is possible to configure the NavigationService to respond to one or more publications that result in page navigation. This is the attribute that will be set to respond to those publications.
Type:
  • object[]
Default Value:
  • null
Source:

Methods

buildUrl(data) → {string}

Builds a URL from the supplied data object.
Parameters:
Name Type Description
data object The data object form which to construct the URL
Source:
Returns:
The built URL
Type
string
This is the default page navigation handler. It is called when the service receives a publication on the navigateToPageTopic topic. At the moment it makes the assumption that the URL data will be relative to the Share page context.
Parameters:
Name Type Description
data object An object containing the information about the page to navigate to.
Source:
To Do:
  • explain what data can contain...

postToPage(data)

Sometimes we need to navigate to a page using post data (e.g. Assign Workflow action)
Parameters:
Name Type Description
data
Source:

registerSubscriptions()

Sets up the subscriptions for the NavigationService. The navigateToPageTopic topic is handled by the navigateToPage function and the reloadPageTopic is handled by the reloadPage function.
Since:
  • 1.0.32
Source:
Listens to Events:

reloadPage(data)

Reloads the current page. Despite the simplicity of the action, page refreshes should still be handled over the pub/sub layer as this provides an opportunity for additional logging and other actions required by third party extensions.
Parameters:
Name Type Description
data object An object containing additional information. NOTE: Currently, no additional data is processed
Source:

setupNavigationSubscriptions(subscription)

Sets up a subscription to handle publications that occur on the page that should trigger navigation.
Parameters:
Name Type Description
subscription object The subscription to configure
Source: