PP.App.init

Syntax

init(name: String|PP.App.ModuleType, settings: Object);

Parameters

name. Unit name or type.

settings. Application settings.

Description

The init method initializes application.

Comments

Value of the settings parameter is a JSON object with the properties listed in the table below:

Property

Type

Brief description

Locale

PP.CultureNames It determines language and regional settings.

RootResourceFolder

String It determines path to root folder of resource files.

RenderAddressBar

Boolean It determines whether address bar should be rendered.

ObjectName

String It determines object name; unit name is specified by default.

ParentNode

String It determines, which HTML document will contain the layout corresponding to the application, "document.body" value is set by default.

Callback

PP.Delegate|Func Callback function called after executing server requests.

SkipLoadConfig

Boolean Determines whether it is possible to skip reloading configuration from server.

Config

PP.AppConfig It determines additional settings.

Module

Object It determines unit settings.

Metabase

Object It determines repository connection settings.

EventsMap

Array It determines native handlers for browser events. It is an array of JSON object with the following fields: NativeEvent - native event, HandleName - handler name, Overridable - indication of possible redefining, Handle - event handler.

Example

The method use is given in the example for PP.App.openMetabase.

See also:

PP.App