Tile

Overview

The Tile component is a contractual component that displays the description and actions associated with transfers and beneficiaries. The Tile component contains the following features for customization.

  • Header with a Header text and Header Icon
  • A short description below the header.
  • A link in the description to expand the short description.
  • Links for various actions such as add a new beneficiary, make a new transfer, and activate P2P profile for the user.
  • The display and execution of the actions depend on the entitlements set for the user.

NOTE: The Tile Component is used inside the Mobile Banking application.

Tile Component Contracts

The Tile component contains the following contracts for customizing the widgets in the Tile Component.

Service Parameters

The Service Parameters contract is used to retrieve the response data required for the Tile Component. By default, the Tile component does not contain any value for the Service Parameter contract.

{}

Data Mapping

The Data Mapping property of the Tile component binds the data from the context variable with the widget IDs in the Tile component.

To map data with the widgets in the Data Mapping property, follow these formats.

  • To map a plain string provide the text in the String format. For example, to map a text with lblTransactionType, follow this format.
    "lblTransactionType": "Within Same Bank"
  • To map an i18n value, the i18n key value can be provided in a String format. In the following example, the lblTransactionTypeLabel is mapped with the i18n key for the particular transfer type.
    "lblTransactionType": "${i18n{i18n.common.sameBank}"

Here is a sample of the JSON object provided in the Data Mapping contract of the Tile component.

{
	"lblTransactionType": "Within Same Bank",
	"btnDescriptionActionBtn1": "Make Transfer",
	"btnDescriptionActionBtn2": "Add New Account",
	"btnAction1": {
		"text": "Transfer Now",
		"entitlements": [
			"INTRA_BANK_FUND_TRANSFER_CREATE",
			"TRANSFER_BETWEEN_OWN_ACCOUNT_CREATE"
		]
	},
	"btnAction2": {
		"text": "Add New Account",
		"entitlements": [
			"INTRA_BANK_FUND_TRANSFER_CREATE_RECEPIENT",
			"TRANSFER_BETWEEN_OWN_ACCOUNT_CREATE_RECEPIENT"
		]
	},
	"imgTransactionIcon": "domestic.png",
	"lblDescription": "Transfer between your own accounts or other accounts in the same bank",
	"MoreLink": "Learn More",
	"imgTransDescriptionIcon": "domestic.png",
	"transferType": "Within Same Bank"
}

The Data Mapping contract is assigned a JSON object with the following key-value pairs.

Key Description
lblTransactionType Sets the text to be displayed for the type of transfer.
btnDescriptionActionBtn1 and btnDescriptionActionBtn2 Maps the button text in the description page.
btnAction1 and btnAction2

This parameter maps the data required for the action buttons in the Tile component using a JSON object. The JSON objects contains the following key value pairs.

  • text: Sets the button text.
  • entitlements: Sets the actions for which access is to be provided.
imgTransactionIcon Sets the image source (with the file extension) to be displayed corresponding to the transfer type.
lblDescription

Sets the text to be displayed for the description of the Transfer.

MoreLink Sets the text for the hyper link to be clicked to expand and display the full description.
imgTransDescriptionIcon Sets the image source (with the file extension) to be displayed corresponding to the transfer type description.
transferType Stores the information related to the transfer type.

Data Formatting

The Data Formatting property is used to provide a custom format for a specific requirement. By default, this component contains no value in this contract.

{}

Conditional Mapping Key

The Conditional Mapping Key is used to define mapping based on a criterion.

For example, if a label defined in the UI must display different data according to the type of account, a developer must set the Conditional Mapping Key property to the following value. By default, this component contains no value in this contract.

{}

Conditional Mapping

The Conditional Mapping property key is used to map a widget with a data from Collection Object or service response as per the Conditional Mapping key. By default, this component contains no value in this contract.

{}

onError event

The OnError event is invoked when an error occurs during the user journey. When the onError event is invoked, an error object is passed to the parent widget. This object contains the information about the error as well as where it had occurred.

Parameter Value
Input parameter JSON object

Object Description

The JSON object contains the following keys:

  • level: This key contains the String value regarding the place in which the error occurs. It can be from the component View controller or from the component Business controller.
  • method: This key contains the method to be executed when an error occurs.
  • error: This key contains the actual error message and the stack.

Sample Input

var errordata = {
	"level": "ComponentViewController",
	"method": "render",
	"error": err
};
this.onError(errordata);

hideTile Event

This event hides a particular tile based on entitlements provided to the buttons using the Data Mapping contract.

Parameter Value
Input parameter NA
Programmatic Name hideTile

Sample Code

this.hideTile(); 

Return Type

NA

enableHideDescription Event

This event is triggered when the user wants to open or close the description page provided in the Tile Component. When the user clicks the hyperlink to display the description page, if the value provided in this event is true, the description page appears. The description page closes if the value provided in this event is false.

Parameter Value
Input parameter

Visibility: Boolean value that enables or disables the display of the full description in another screen.

Programmatic Name enableHideDescription

Sample Code

this.enableHideDescription(Visibility); 

Return Type

NA

buttonActionHandling Event

This event is triggered when any button on the tile is clicked or tapped.

Parameter Value
Input parameter

transferTypeDetails: Sets the details of the type of transfer in a String format. This parameter is passed to the parent of the component (For example, Form Controller) to decide the navigation logic.

Programmatic Name buttonActionHandling

Sample Code

this.buttonActionHandling(transferTypeDetails); 

Return Type

NA

setContext Method

This method is invoked inside the parent component or form controller. This method is used to pass the Context Data Object required for the Tile component.

Parameter Value

Syntax

this.view.componentID.setContext(contextData);

Input parameter

JSON object containing the context variable. For more information on the context object, click here.

Sample Input

this.view.tile.setContext(contextData);

Return Type

None

closeDescription Method

This method is used to close the Tile description pop-up.

Parameter Value

Syntax

this.view.<componentID>.closeDescription();

Input parameter

NA

Sample Input

this.view.tile.closeDescription();

Return Type

NA

Context Object

The context object is a JSON object that is used as an input in the Tile component. The Context Object is used to pass data (such as entitlements) from the parent of the component to the Tile component.

Here is a sample of the Context JSON Object used inside the component.

var contextData = {
	"params": {
		"entitlements": {
			"features": [
				"TRANSFER_BETWEEN_OWN_ACCOUNT_CREATE_RECEPIENT",
				"INTRA_BANK_FUND_TRANSFER_CREATE",
				"TRANSFER_BETWEEN_OWN_ACCOUNT_CREATE",
				"INTRA_BANK_FUND_TRANSFER_CREATE_RECEPIENT"
			],
			"permissions": ""
		}
	}
};

 

 

Copyright © 2020- Temenos Headquarters SA

Published on :
Monday, May 2, 2022 5:09:01 PM IST

Feedback
x