Skip to main content

showLayout

Displays the specified content on the specified layout.

Field Configurations

KeyTypeDescriptionDefault Value
"params" (required)Objectundefinednull

Parameters

KeyTypeDescriptionDefault Value
"async"BooleanSpecifies whether the action should perform asynchronously.null
"content"String,ObjectContent to be displayed. This resembles the content of a static template.null
"events"EventThe events for the new view.null
"isCancelable"BooleanDetermines whether the pop-up closes when you press outside or the Back button.true
"layout"StringThe name of the layout.null
"name"StringThe name of the view. Used by the closeView Action to close it.null
"namedStyle"StringThe name of a style to use for this view."default"
"onViewStack"BooleanThis field is deprecated. Please use or omit the replace prefix in the target.null
"popUpDeltaX"UnitSizeShift in the X direction of the pop-up.0
"popUpDeltaY"UnitSizeShift in the Y direction of the pop-up.0
"popUpHeight"UnitSizeThe height of the pop-up."245dp"
"popUpWidth"UnitSizeThe width of the pop-up."395dp"
"query"StringThe query for a database request.null
"queryParams"ArrayThe params for the query.null
"staticTemplate"StringClient template that will be used in case the query is not defined or has no data.null
"style"StyleThe styles for the new view.null
"table"StringThe table for a database request.null
"target"ShowViewTargetLocation where the new layout should be displayed."tabActive"
"template"StringThe template which should be applied to the database result.null
"templateData"String,ObjectData for the template to apply.null
"templateIsNode"BooleanDetermines if the template is a complete node or just the content.false
"title"StringThe title of the new view.null
"transition"BooleanIf set to false, will deactivate the fade-in/fade-out effect when a new view opens or closes.true
"type"ShowViewTypeThe type of the shown view"layered"

Inherited

From Base Action

Base Action

Field Configurations

KeyTypeDescriptionDefault Value
"dynamicParams"ObjectDynamic params to retrieve data from a specific context e.g. a userSetting.null
"leadingDelimiter"StringThe leading mustache delimiter to use.null
"params"Object,ArrayObject containing the properties of the action.null
"trailingDelimiter"StringThe trailing mustache delimiter to use.null
"type"StringType name of the action.null

Examples

Example 1: Show a layout with static content

Goal: Show a new layout with statically inserted content.

To achieve this the following code can be used:

{
"type": "showView",
"params": {
"layout": "p_text",
"target": "menuRight",
"content": {
"backgroundColor": {
"value": "#aaaaaa"
},
"text": {
"value": "Rechts",
"fontColor": "#000000"
}
}
}
}

Result:

A layout with a color element identified as backgroundColor and a text element identified with text will be shown with the corresponding values and colors.

Example 2: Show a layout with content from a database

Goal: Show a new layout with content retrieved from a database query.

To achieve this the following code can be used:

{
"type": "showView",
"params": {
"layout": "c_detail",
"target": "view",
"table": "locations",
"query": "byId",
"queryParams": [
"42"
],
"template": "location"
}
}

Result:

A layout will be shown with the relevant data.