Container Data Model
View the structure of a container in the container data model. This structure comprises the type of the container, its access order, and its items.
- Data
- This contains the data context associated with container items opened in the application.
- Containers
- This contains information about the usage and contents of each container used in the application.
Each container contains the following entries:
- Type
- accessedOrder
- Items
Type
This represents the type of the container.
There are two types of containers:
- Single containers that contain only one item.
- Multiple containers that contain multiple items.
accessedOrder
This is an array that contains the fully qualified names of container items in the order they were accessed. This order is used to activate the most recently used container item when the current active item is deleted.
Items
This is a map containing the information about the specific items in a container. Each entry in the map contains the root view information of the corresponding item, a semantic URL which contains the unique ID of the item, and the data context from the primary data entry of the Store for the corresponding item.
Usage example
In this example, there are two containers, app/primary
and
app/primary_2/workarea
. The app/primary
container has been used to access the app/primary_1
and
app/primary_2
items. Since the app/primary_2
item was most recently accessed, it appears last in the
accessedOrder
array.
You can view the contents of the app/primary_2
item from its entry
in the app/primary
item structure. The
app/primary_2
item is associated with a view
containing the pyDetails
information about the content of a
caseInfo
object. This is represented with a semantic URL
RequestApproval/ RA-123
.
The information about the caseInfo
object can be found in the
information of the app/primary_2
item found in the
data
key of the Store.
{
data: {
app: {
},
'app/primary_1': {
...
},
'app/primary_2': {
pxRequestor: {
pxUserName: 'abc',
pxUserIdentifier: '[email protected]'
},
caseInfo: {
content: {
...
}
}
}
},
containers: {
'app/primary': {
type: 'multiple',
accessedOrder: [
'app/primary_1',
'app/primary_2'
],
items: {
'app/primary_1': {
...
},
'app/primary_2': {
view: {
type: 'reference',
config: {
name: 'pyDetails',
context: 'caseInfo.content',
type: 'view'
}
},
semanticURL: 'RequestApproval/{workID}',
key:'OE7UD6-SPACETRAVEL-WORK RA-123',
context: 'app/primary_2'
}
}
},
'app/primary_2/workarea':{
...
}
}
}
Previous topic Working with containers Next topic Life cycle of a container