ApplicationScreen ^v2.7.212
A single screen in an application.
js
const app = security.application("My Application");
const screen = app.screens.get("Planner");
screen.setHomepage();Constructor
Returned by create() and get() on an application's screens. It can't be created directly.
Methods
id id() string
Returns the screen's id.
title title() string
Returns the screen's title.
setTitle setTitle(title) boolean
Changes the screen's title.
| Parameter | Type | Description |
|---|---|---|
title | string | The new title, up to 150 characters. |
route route() string
Returns the screen's route.
setRoute setRoute(route) boolean
Changes the screen's route.
| Parameter | Type | Description |
|---|---|---|
route | string | The new route, up to 150 characters. It must be unique in the application. |
page page() string
Returns the id of the page shown on the screen.
pageType pageType() string
Returns the type of page shown on the screen: "workview", "card" or "page".
pageName pageName() string
Returns the name of the page shown on the screen.
setPage setPage(type, id) boolean
Changes the page shown on the screen.
| Parameter | Type | Description |
|---|---|---|
type | string | "workview", "card" or "page". |
id | string | The page's id. |
header header() string | null
Returns the id of the page used as the screen's header, or null when there's no header.
setHeader setHeader(header) boolean
Changes the screen's header.
| Parameter | Type | Description |
|---|---|---|
header | string | The id of the page to use as the header. Pass "" to remove it. |
footer footer() string | null
Returns the id of the page used as the screen's footer, or null when there's no footer.
setFooter setFooter(footer) boolean
Changes the screen's footer.
| Parameter | Type | Description |
|---|---|---|
footer | string | The id of the page to use as the footer. Pass "" to remove it. |
setHomepage setHomepage() boolean
Makes this screen the application's homepage.
remove remove() boolean
Deletes the screen from the application. Returns true when it was deleted.
json json() object
Returns the screen as an object, with its id, title, page, route, header, footer, page_type and page_name.
Examples
js
const app = security.application("My Application");
const screen = app.screens.get("Planner");
screen.setTitle("Planning");
screen.setPage("workview", "workview-id");
screen.setHomepage();
console.log(screen.json());Related
- ApplicationScreens: creates and finds screens.