Skip to content

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.

ParameterTypeDescription
titlestringThe new title, up to 150 characters.

route route() string ​

Returns the screen's route.

setRoute setRoute(route) boolean ​

Changes the screen's route.

ParameterTypeDescription
routestringThe 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.

ParameterTypeDescription
typestring"workview", "card" or "page".
idstringThe page's id.

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.

ParameterTypeDescription
headerstringThe id of the page to use as the header. Pass "" to remove it.

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.

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