showView
Displays the specified content on the specified layout.
Field Configurations
Key | Type | Description | Default Value |
---|---|---|---|
"params" (required) | Object | undefined | null |
Parameters
Key | Type | Description | Default Value |
---|---|---|---|
"async" | Boolean | Specifies whether the action should perform asynchronously. | null |
"content" | String,Object | Content to be displayed. This resembles the content of a static template. | null |
"events" | Event | The events for the new view. | null |
"isCancelable" | Boolean | Determines whether the pop-up closes when you press outside or the Back button. | true |
"layout" | String | The name of the layout. | null |
"name" | String | The name of the view. Used by the closeView Action to close it. | null |
"namedStyle" | String | The name of a style to use for this view. | "default" |
"onViewStack" | Boolean | This field is deprecated. Please use or omit the replace prefix in the target. | null |
"popUpDeltaX" | UnitSize | Shift in the X direction of the pop-up. | 0 |
"popUpDeltaY" | UnitSize | Shift in the Y direction of the pop-up. | 0 |
"popUpHeight" | UnitSize | The height of the pop-up. | "245dp" |
"popUpWidth" | UnitSize | The width of the pop-up. | "395dp" |
"query" | String | The query for a database request. | null |
"queryParams" | Array | The params for the query. | null |
"staticTemplate" | String | Client template that will be used in case the query is not defined or has no data. | null |
"style" | Style | The styles for the new view. | null |
"table" | String | The table for a database request. | null |
"target" | ShowViewTarget | Location where the new layout should be displayed. | "tabActive" |
"template" | String | The template which should be applied to the database result. | null |
"templateData" | String,Object | Data for the template to apply. | null |
"templateIsNode" | Boolean | Determines if the template is a complete node or just the content. | false |
"title" | String | The title of the new view. | null |
"transition" | Boolean | If set to false, will deactivate the fade-in/fade-out effect when a new view opens or closes. | true |
"type" | ShowViewType | The type of the shown view | "layered" |
Inherited
From Base Action
Base Action
Field Configurations
Key | Type | Description | Default Value |
---|---|---|---|
"dynamicParams" | Object | Dynamic params to retrieve data from a specific context e.g. a userSetting. | null |
"leadingDelimiter" | String | The leading mustache delimiter to use. | null |
"params" | Object,Array | Object containing the properties of the action. | null |
"trailingDelimiter" | String | The trailing mustache delimiter to use. | null |
"type" | String | Type 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.