An "app" object JavaScript variable is available in all app events, app views events, app dialogs events and all the controls events. The "app" variable provide several app properties and app methods, as well the below referred app constants, ready to be used.
Runtime. Object constant. This constant stores all the possible values to be used in some controls properties, like the Size property of the Push button control.
xxxxxxxxxx
// Set the size "md" (medium) of a push button control
views.view1.button1.size = app.size.md;
// All available values are:
// Small
app.size.sm
// Medium
app.size.md
// Large
app.size.lg
// Extra large
app.size.xl
Runtime. Object constant. This constant stores all the possible values to be used in some properties, like the app Sidebar.HeaderAlign property.
xxxxxxxxxx
// Set the align "left" to the app sidebar header
app.sidebar.headerAlign = app.align.left;
// All available values are:
// Left
app.align.left
// Center
app.align.center
// Right
app.align.right
Runtime. Object constant. This constant stores all the possible values to be used for the app theme color.
xxxxxxxxxx
// Set the app theme color to dark
app.setAppThemeColor(app.themeColor.dark);
// All available values are:
// light
app.themeColor.light
// light
app.themeColor.dark
Runtime. Object constant. This constant stores all the possible values to be used in some controls properties, like the Kind property of the Push button control.
xxxxxxxxxx
// Set the direction "up" to the dropdown
views.view1.button1.kind = app.kind.danger;
// All available values are:
// Primary
app.kind.primary
// Secondary
app.kind.secondary
// Success
app.kind.success
// Danger
app.kind.danger
// Warning
app.kind.warning
// Info
app.kind.info
// Light
app.kind.light
// Dark
app.kind.dark
// Link
app.kind.link
Runtime. Object constant. This constant stores all the possible values to be used in some controls properties, like the ImageFit property of the Image control.
xxxxxxxxxx
// Set the image fit "cover" to the image
views.view1.image1.imageFit = app.imageFit.cover;
// All available values are:
// Fill
app.imageFit.fill
// None
app.imageFit.none
// Cover
app.imageFit.cover
// Contain
app.imageFit.contain
// Scale down
app.imageFit.scale
Runtime. Object constant. This constant stores all the possible values to be used in some controls properties, like the Direction property of the Dropdown control.
xxxxxxxxxx
// Set the direction "up" to the dropdown
views.view1.dropdown1.direction = app.dropdownDir.up;
// All available values are:
// Direction up
app.dropdownDir.up
// Direction down
app.dropdownDir.down
// Direction left
app.dropdownDir.left
// Direction right
app.dropdownDir.right
Runtime. Object constant. This constant stores all the possible values to be used in some controls properties, like the Item.class property of the Dropdown control.
xxxxxxxxxx
// All available values are:
// Item class
app.dropdownItem.item
// Header class
app.dropdownItem.header
// Divider class
app.dropdownItem.divider
Runtime. Object constant. This constant stores all the possible values to be used in the AutoClose property of the Dropdown control.
xxxxxxxxxx
// All available values are:
// Default value
app.dropdownAutoClose.true
app.dropdownAutoClose.inside
app.dropdownAutoClose.outside
app.dropdownAutoClose.false
Runtime. Object constant. This constant stores all the possible values to be used in some controls properties, like the Position property of the Navbar control.
xxxxxxxxxx
// Set navbar fixed to the top
views.view1.navbar1.position = app.navbarPos.fixedTop;
// All available values are:
// Navbar fixed top
app.navbarPos.fixedTop
// Navbar fixed bottom
app.navbarPos.fixedBottom
// Navbar sticky top
app.navbarPos.stickyTop
Runtime. Object constant. This constant stores all the possible values to be used in some controls properties, like the NavbarStyle property of the Navbar control.
xxxxxxxxxx
// Set navbar style to dark
views.view1.navbar1.navbarStyle = app.navbarStyle.dark;
// All available values are:
// Navbar light
app.navbarStyle.light
// Navbar dark
app.navbarStyle.dark
Runtime. Object constant. This constant stores all the possible values to be used in the Method property of the Http Client control.
xxxxxxxxxx
// All available values are:
// HTTP GET method
app.httpMethod.get
// HTTP POST method
app.httpMethod.post
// HTTP PUT method
app.httpMethod.put
// HTTP HEAD method
app.httpMethod.head
// HTTP DELETE method
app.httpMethod.delete