Advanced Customization > Using Reusable Components > Available Reusable Components > Attributes
  
Attributes
Definition and Usage
The Attributes reusable component is a widget that displays name-value pairs. The name appears at the top and the value appears below it. You can display attributes in a vertical stack one below the other, or in columns one next to the other. The Attributes reusable component supports displaying data of different data types and honors rich text formatting.
You can display attributes in a group with a title.
You can configure the Attributes reusable component in the following ways:
Define the title for attribute group
Define the attributes to show
Set the maximum height and width settings for the attributes
Define whether the value display, which includes both the attribute name and value, is single line or multiline
The following is a sample image showing the Attributes reusable component:
There are no predefined configurations available for the Attributes reusable component.
Binding Properties
There are two properties for the Attributes component that are available for binding:
Input— JSON that is the input ID for which data needs to be fetched from the backend system. This information is provided in a CCO (Common Communication Object) format. The following is a sample:
{
"version":"1.0.0",
"data":[
{
"adapter":{
"thingName":"PTC.WCAdapter",
"instanceName":"windchill"
},
"itemListsData":[
{
"objectType":"PTC.ChangeMgmt.ChangeRequest",
"items":[
{
"id":{
"value":"OR:wt.change2.WTChangeRequest2:439476"
}
}
]
}
]
}
]
}
TailoringName— String that is the instance name of the component. It is tightly coupled to tailoring. TailoringName is used to fetch the saved tailoring information for each component.
Configuration Fields
The following table shows the JSON fields used to configure this component.
Property Name
Description
Type
Default Value
Required or Optional
attributes
Property names for which the data is expected from backend system. See subproperties:
MultiValueSetsSelector
N/A
Required
id
The property-name identifier of the attribute in the backend system.
String
N/A
Required
ordinal
Order in which attributes appear in the component. 0 indicates the top leftmost position.
Integer
N/A
Optional
objectType
Object type for which the attributes are to be fetched.
String
N/A
Required
name
Name of attribute group.
String
N/A
Required
adapter
Source configuration for the backend system. See subproperties:
JSON
N/A
Required
instanceName
Connector instance, meaning which connector to be used to connect to the backend system.
String
N/A
Required
thingName
Name of the backend system or adapter from which data is retrieved.
String
N/A
Required
inTailoring
Whether or not the Attributes component is tailorable in the tailoring page. Options: true, false.
Boolean
false
Optional
isMultiLine
See subproperties:
N/A
N/A
Optional
value
When set to true, content values are wrapped. Also “show more/show less” link is visible if content exceeds maxHeight property value.
When set to false, text is not wrapped and shown with ellipsis.
Options: true, false.
Boolean
true
Required
version
Configuration version.
String
1.0.0
Optional
maxHeight
See subproperties:
N/A
N/A
Required only if value property under isMultiLine is set to true.
value
Maximum height for ptcs-value-display, which includes height for both attribute name and value in the user interface.
Integer
200
Required only if value property under isMultiLine is set to true.
version
Configuration version.
String
1.0.0
Optional
isColumns
See subproperties:
N/A
N/A
Optional
value
When set to true, attribute name-value pairs are shown in the user interface in column form, or horizontally stacked one next to the other.
When set to false, attribute key-value pairs are shown in the user interface in single column, or vertically stacked one below the other.
Options: true, false.
Boolean
false
Required
version
Configuration version.
String
1.0.0
Optional
maxWidth
See subproperties:
N/A
N/A
Required only if isColumns property is set to true.
value
Maximum width for an attribute value in user interface.
Integer
300
Required only if isColumns property is set to true.
version
Configuration version.
String
1.0.0
Optional
modelThing
See subproperties:
N/A
N/A
Required
entityName
The name of the model Thing that gets the data.
String
PTC.Attrib utePanelModelThing
Required
version
Configuration version.
String
1.0.0
Optional
Sample Configuration
{
"maxHeight": {
"version": "1.0.0",
"value": 200
},
"maxWidth": {
"version": "1.0.0",
"value": 300
},
"attributes": {
"sets": [
{
"data": {
"selectedValues": {
"data": [
{
"itemListsData": [
{
"items": [
{
"id": "ProposedSolution",
"ordinal": 0
},
{
"id": "RecurringCost",
"ordinal": 1
}
],
"objectType": "PTC.ChangeMgmt.ChangeRequest"
}
],
"adapter": {
"instanceName": "windchill",
"thingName": "PTC.WCAdapter"
}
}
]
},
"version": "1.0.0",
"inTailoring": true
},
"name": "Additional Attributes"
}
],
"inTailoring": true,
"version": "1.0.0"
},
"isMultiLine": {
"version": "1.0.0",
"value": true
},
"modelThing": {
"entityName": "PTC.AttributePanelModelThing",
"version": "1.0.0"
},
"isColumns": {
"value": false,
"version": "1.0.0"
}
}