ApplicationScreens ^v2.7.212
An application's screens.
js
const app = security.application("My Application");
const screen = app.screens.create("Planner", "planner-page");Constructor
Reached through the screens property of an ApplicationSecurity. It can't be created directly.
Methods
list list() array
Returns a summary of every screen, in the order they're defined. Each entry is the same object json() returns.
get get(screenNameOrId) ApplicationScreen | null
Returns an ApplicationScreen, or null when there's no such screen.
| Parameter | Type | Description |
|---|---|---|
screenNameOrId | string | The screen's title or id. |
exists exists(screenNameOrId) boolean
Returns true when the screen exists.
| Parameter | Type | Description |
|---|---|---|
screenNameOrId | string | The screen's title or id. |
create create(title, route) ApplicationScreen
Creates a screen and returns it as an ApplicationScreen.
| Parameter | Type | Description |
|---|---|---|
title | string | The screen's title, up to 150 characters. |
route | string | The screen's route. It must be unique in the application. |
remove remove(screenNameOrId) boolean
Deletes a screen. Returns true when it was deleted.
| Parameter | Type | Description |
|---|---|---|
screenNameOrId | string | The screen's title or id. |
removeAll removeAll() boolean
Deletes every screen in the application.
Examples
js
const app = security.application("My Application");
const screens = app.screens;
const plannerScreen = screens.create("Planner", "planner-page");
plannerScreen.setPage("page", "My Planner Page");
console.log(screens.exists("Planner"));
console.log(plannerScreen.json());Related
- ApplicationScreen: a single screen.
- ScreenTag: controls who can see screens.