mx.screen
The mxui.wm.Screen
subsystem provides an API to manage the content in the three different targets.
Properties
-
Methods
startup(callback)
This method is called to startup the subsystem.
Parameters
Name | Type | Description |
---|---|---|
callback | Function | The function to be called when startup is finished. |
Returns
-
shutdown()
This method is called to shutdown the subsystem.
Parameters
-
Returns
-
isLoaded()
This method is called to check whether the subsystem has been started.
Parameters
-
Returns
Type | Description |
---|---|
Boolean | true if the subsystem has been started. |
hasLayout()
This method is called to check whether the client resizes every screen to fit the viewport.
Parameters
-
Returns
Type | Description |
---|---|
Boolean | Whether the dimensions are calculated. |
reloadContent()
This method is called to invoke the reload
method of every top level widget.
Parameters
-
Returns
-
resizeContent(args)
This method is called to resize the content of a target. The target is deduced from the specified widget. mxui.widget._Widget.resizeContent is an alias for this method.
Parameters
Name | Type | Description |
---|---|---|
args.widget | mxui.widget._Widget | The widget for which to resize the surrounding content. |
Returns
-
disposeContent(args)
This method is called to dispose the content of a target. The target is deduced from the specified widget. mxui.widget._Widget.disposeContent is an alias for this method.
Parameters
Name | Type | Description |
---|---|---|
args.widget | mxui.widget._Widget | The widget for which to dispose the surrounding content. |
Returns
-
suspendContent(args)
This method is called to suspend the content of a target. The target is deduced from the specified widget.
Parameters
Name | Type | Description |
---|---|---|
args.widget | mxui.widget._Widget | The widget for which to suspend the surrounding content. |
Returns
-
Examples
mx.screen.suspendContent({
widget : this
});
resumeContent(args)
This method is called to resume the content of a target. The target is deduced from the specified widget.
Parameters
Name | Type | Description |
---|---|---|
args.widget | mxui.widget._Widget | The widget for which to resume the surrounding content. |
Returns
-
getTitle()
This method is called to get the title of a target. The target is deduced from the specified widget. mxui.widget._Widget.getTitle is an alias for this method.
Parameters
Name | Type | Description |
---|---|---|
args.widget | mxui.widget._Widget | The widget for which to get the title. |
Returns
-
getUIPlace()
This method is called to get the ui place of a target. The target is deduced from the specified widget. mxui.widget._Widget.getUIPlace is an alias for this method.
Parameters
Name | Type | Description |
---|---|---|
args.widget | mxui.widget._Widget | The widget for which to get the ui place. |
Returns
-
applyToNode(action, node, handler)
This method is called to apply an action to a node. The action could be one of “show”, “hide”, “disable”, “enable”, “custom”. If the specified node is the domNode of a widget, the widget’s api methods are used instead of DOM manipulation.
Parameters
Name | Type | Description |
---|---|---|
action | String | The action to execute on the node or widget. |
node | DOMNode | The node on which to trigger the action. |
handler | Function | Optional handler which is used if action is “custom”. |
Returns
-
Examples
applyToNodes(args)
This method is called to apply an action to a list of nodes. See applyToNode for more information.
Parameters
Name | Type | Description |
---|---|---|
args.content_id | String | The content id of the surrounding content. |
args.mxids | Array | The mxid’s of the nodes to apply the action to. |
args.action | String | The action to execute on the nodes or widgets. |
args.node | DOMNode | Optional node to narrow the scope in which is searched for the nodes. |
args.handler | Function | Optional handler to use when action is “custom”. |
Returns
-
back()
This method is called to go one step back in the history.
Parameters
-
Returns
-
forward()
This method is called to go one step forward in the history.
Parameters
-
Returns
-
refresh()
This method is called to refresh the current form in content.
Parameters
-
Returns
-
setContent(args)
This method is called to set the content of a specified target.
Parameters
Name | Type | _.Description |
---|---|---|
args.targeturl | String | The url of the form to open. |
args.targetparams | Object | The parameters to add to newly created widgets. |
args.targetparams.mxcontext | mendix.lib.MxContext | Optional context to open the form with. |
args.uilocation | String | Target in which to open the form (popup/modal/content). |
Returns
-
subscribe(contentid, message, callback)
This method is called to subscribe to a screen message (like saveObject / commitObject).
Parameters
Name | Type | Description |
---|---|---|
contentid | String | The id of the content to get messages from. |
message | String | The message on which to subscribe. |
callback | Function | A function to handle the message. |
Returns
Type | Description |
---|---|
Array | Handler to unsubscribe (see unsubscribe. |
unsubscribe(handler)
This method is called to unsubscribe from a screen messages.
Parameters
Name | Type | Description |
---|---|---|
handler | Array | Handler which is the return value of the subscribe call. |
Returns
Type | Description |
---|---|
Array | Handler to unsubscribe (see unsubscribe. |
sendMessage(contentid, message, args)
This method is called to send a screen message to all listeners (subscribed on this particular message with subscribe).
Parameters
Name | Type | Description |
---|---|---|
contentid | String | The id of the content to get messages from. |
message | String | The message to send. |
args | Function | The arguments to call the listeners with. |
Returns
Type | Description |
---|---|
dojo.Deferred | A deferred on which error and callback functions can be added. See dojo.Deferred documentation. |
showLogin()
This method is called to show the login form. Do not manually call this method.
Parameters
Name | Type | Description |
---|---|---|
contentid | String | The id of the content to get messages from. |
message | String | The message to send. |
args | Function | The arguments to call the listeners with. |
Returns
Type | Description |
---|---|
dojo.Deferred | A deferred on which error and callback functions can be added. See dojo.Deferred documentation. |
hideLogin()
This method is called to hide the login form. Do not manually call this method.
Parameters
-
Returns
-
logout()
Redirect user to login form. Do not manually call this method.
Parameters
-
Returns
-
showNavigator()
Show the Navigator.
Parameters
-
Returns
-
showNavigator()
Hide the Navigator.
Parameters
-
Returns
-
showProgress()
Show the loading icon.
Parameters
-
Returns
-
hideProgress()
Hide the loading icon.
Parameters
-
Returns
-