Skip to content

Application Screens ^v2.7.212

Returns the application screens object from security.application.

Application Screens Object

Methods

  • list()

    Returns an array of ApplicationScreen objects on the application.

  • exists(screenNameOrId)

    Returns true if a screen exists on the application, otherwise false.

    • screenNameOrId (string): The screen title or id.
  • get(screenNameOrId)

    Returns an ApplicationScreen object from the application, or null if no screen is found.

    • screenNameOrId (string): The screen title or id.
  • remove(screenNameOrId)

    Removes a screen from the application and returns true if the screen was removed, otherwise false.

    • screenNameOrId (string): The screen title or id.
  • removeAll()

    Removes all screens from the application.

  • create(title, route)

    Creates and returns an ApplicationScreen object on the application.

    • title (string): The screen title.
    • route (string): The route for the screen.

Examples

js
var app = security.application("My Application");
var screens = app.screens;

var plannerScreen = screens.create("Planner", "planner-page");
plannerScreen.setPage("screen", "My Planner Page");

console.log(screens.exists("Planner"));
console.log(plannerScreen.json());