Application pages support and navigation.
- Source:
Methods
(static) getActivePageId() → {String|undefined}
stable API
Gets the page ID of the currently active page, can be undefined.
- Version:
- 16.3.5
- Source:
Returns:
ID of the active page or undefined in case not beeing in the Page Designer
- Type
- String | undefined
Example
// gets the active page ID
var activePageId = Abcs.Pages().getActivePageId();
// shows notification
Abcs.UI().showNotification(Abcs.UI().Notification.create({
message: 'Welcome on the page \'' + activePageId + '\'.'
});
(static) getHomepageId() → {String}
stable API
Gets the page ID of the homepage.
- Version:
- 16.3.5
- Source:
Returns:
ID of the home page
- Type
- String
Example
// gets the homepage ID
var homepageId = Abcs.Pages().getHomepageId();
// navigates to the homepage (using the Page's ID)
Abcs.Pages().navigateToPage(homepageId);
(static) navigateHome() → {Promise}
stable API
Navigates application to the homepage.
- Version:
- 15.4.5
- Source:
Returns:
Can be used when you want to chain another operation after the page switch.
- Type
- Promise
Examples
Abcs.Pages().navigateHome();
Abcs.Pages().navigateHome()
.then(function() {
// after the page switch open the alert dialog
alert('you are on HOMEPAGE now');
});
(static) navigateToPage(pageId, contextualDataopt) → {Promise}
stable API
Navigates application to the given page.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
pageId |
String | ID of the page where to navigate to |
||
contextualData |
viewmodel/js/api/context/ContextualData |
<optional> |
emptyContext | context to be passed to the page. Defaults to empty context (ContextualData.createBlankPageContext). |
- Version:
- 15.4.5
- Source:
Returns:
Can be used when you want to chain another operation after the page switch.
- Type
- Promise
Examples
Abcs.Pages().navigateToPage('home');
var blankPageContext = ContextualData.createBlankPageContext({caller:'currentPageId'});
Abcs.Pages().navigateToPage('home', blankPageContext)
.then(function() {
// after the page switch open the alert dialog
alert('you are on "home" now');
});