Additional Information on the GetImplementationSettings Service for Item List
This topic describes the GetImplementationSettings service, which is a customization service available for Item List. This service is generally used when Item List displays data in a structure tree, as opposed to in a flat list. For example, both the Part Structure and Document Structure predefined configurations of Item List use this service.
Additionally, this service must be implemented if you want to enable the selectedItems input binding property. The selectedItems property allows you to preselect an item in the Item List.
The GetImplementationSettings service can contain the following three properties. Each property can hold one or more attributes per item, as long as there is only one attribute per object type.
• itemIdentifierKeys
This required key contains the attribute, on each input item, with which the item can be selected. Any other attributes given in the input of selectedItems will be ignored. Only the first specified attribute is considered; any additional attributes are ignored.
If the attribute’s values are unique for each item, then when using selectedItems, only a single item is selected. If it isn't unique, then all items with that value on that attribute are selected.
• itemExpansionKeys
This optional key is only relevant when Item List displays hierarchical data. It supports expanding items that are initially collapsed (for example, due to a default expansion level) in the structure tree when a collapsed item is selected using selectedItems. The attributes in itemExpansionKeys are used to identify any items that are missing from the structure. Since the attribute values are used to identify items, the attribute values should be unique for each item.
The default implementation of the following services use
itemExpansionKeys:
GetChildren,
MapItemToInputObject,
GetItemsByExpansionPath,
GetStructureSkeleton. For more information see the
Customization Services section in the
Item List topic.
• hasChildrenKeys
This optional key is only relevant when Item List displays hierarchical data.
hasChildrenKeys contains the name of the attribute on each item that is used to determine if that item has any sub-items or not. If this attribute is missing for an item, or the value of the attribute is false, then the item is assumed to have no sub-items. If
hasChildrenKeys is not included, then for the purpose of displaying a tree structure, the presence of an items section under the
PTC.Nav.Descendants key on each item on the items data CCO is used as the indicator of sub-items. For more information see
Common Communication Object Structure.
Sample Code for GetImplementationSettings
Sample Containing Part Structure Items
Sample code for items of a single object type:
"implementationSettings":{
...
"itemIdentifierKeys":[
{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"PartUseId",
"ordinal":0
}
],
"objectType":"PTC.ProdMgmt.PartStructureItem"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
}
}
],
"itemExpansionKeys":[
{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"PathId",
"ordinal":0
}
],
"objectType":"PTC.ProdMgmt.PartStructureItem"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
}
}
],
"hasChildrenKeys":[
{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"HasChildren",
"ordinal":0
}
],
"objectType":"PTC.ProdMgmt.PartStructureItem"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
}
}
]
}Sample code for items of multiple object types:
"implementationSettings":{
...
"itemIdentifierKeys":[
{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"PartUseId",
"ordinal":0
}
],
"objectType":"PTC.ProdMgmt.PartStructureItem"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
}
},
{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"PVTreeId",
"ordinal":0
}
],
"objectType":"PTC.CADDocumentMgmt.CADStructure"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
}
}
],
"itemExpansionKeys":[
{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"PathId",
"ordinal":0
}
],
"objectType":"PTC.ProdMgmt.PartStructureItem"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
}
},
{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"PVTreeId",
"ordinal":0
}
],
"objectType":"PTC.CADDocumentMgmt.CADStructure"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
}
}
],
"hasChildrenKeys":[
{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"HasChildren",
"ordinal":0
}
],
"objectType":"PTC.ProdMgmt.PartStructureItem"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
}
},
{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"HasChildren",
"ordinal":0
}
],
"objectType":"PTC.CADDocumentMgmt.CADStructure"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
}
}
]
}Sample Containing Document Structure Items
"implementationSettings":{
"..."
"itemIdentifierKeys":[
{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"DocumentUseID",
"ordinal":0
}
],
"objectType":"PTC.DocMgmt.DocStructure"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
}
}
],
"hasChildrenKeys":[
{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"HasChildren",
"ordinal":0
}
],
"objectType":"PTC.DocMgmt.DocStructure"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
}
}
],
"overrideItemsDataForExport":{
"value":false
}
}