mx
mendix.Client is the core client instance.
Properties
baseUrl
This is the url of the xas instance, relative to the project url, which defaults to “xas/”.
modulePath
This is the url of the modules (custom widgets), relative to the dojo dir, which defaults to “../../widgets/”.
metadata
This is a reference to the MetaData subsystem (mendix.sys.MetaData).
processor
This is a reference to the Processor subsystem (mendix.sys.Processor).
remote
This is a reference to the RemoteControl subsystem (mendix.sys.RemoteControl).
session
This is a reference to the Session subsystem (mendix.sys.Session).
server
This is a reference to the Server subsystem (mendix.sys.Server).
xas
This is a reference to the XAS subsystem (mendix.sys.XAS).
config
This is a reference to the Config subsystem (mxui.sys.Config).
parser
This is a reference to the DataParser subsystem (mxui.sys.DataParser).
screen
This is a reference to the Screen subsystem (mxui.wm.Screen).
ui
This is a reference to the UserInterface subsystem (mxui.wm.UserInterface).
Methods
startup()
This method is called to startup the Client instance and initialize the subsystems.
Parameters
-
Returns
-
isLoaded()
This method is called to check whether all subsystems have been started.
Parameters
-
Returns
| Type | Description |
|---|---|
| Boolean | true if all subsystems have been started. |
addOnLoad(callback)
This method is called to add a function to be called when the Client is finished loading. If the Client is already loaded, the function will be called immediately.
Parameters
| Name | Type | Description |
|---|---|---|
| callback | Function | The function to be called when the client is finished loading. |
Returns
-
login()
This method is called to authorize the current user. If there is no session yet, or the session has expired, the runtime is probed for a guest account. If anonymous users are not allowed, the login screen is displayed. When autorized the subsystems are started, and the Client is loaded.
Parameters
-
Returns
-
logout()
This method is called to shutdown all subsystems when the user logged out.
Parameters
-
Returns
-
registerSubSystem(prefix, sub, params)
This method is called to register a subsystem. This should be done before startup is called.
Parameters
| Name | Type | Description |
|---|---|---|
| prefix | String | The name of the property on the Client instance which should hold a reference to this subsystem. |
| sub | String | The declared class name of the subsystem. |
| params | Object | Keyword arguments which are passed to the subsystems constructor. |
Returns
-
Examples
mx.registerSubSystem("extra", "module.sys.Extra", { prop : true });