Skip to content

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.

ParameterTypeDescription
screenNameOrIdstringThe screen's title or id.

exists exists(screenNameOrId) boolean ​

Returns true when the screen exists.

ParameterTypeDescription
screenNameOrIdstringThe screen's title or id.

create create(title, route) ApplicationScreen ​

Creates a screen and returns it as an ApplicationScreen.

ParameterTypeDescription
titlestringThe screen's title, up to 150 characters.
routestringThe screen's route. It must be unique in the application.

remove remove(screenNameOrId) boolean ​

Deletes a screen. Returns true when it was deleted.

ParameterTypeDescription
screenNameOrIdstringThe 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());