# Practical presentation for OCA
1. What presentation needs to provide:
- allow to define how given attribute needs to be presented, e.g. binnary as a signature vs upload a file, Text as short string vs multiline text area
- support sections on the page ? Do we really need it? If we would have device and customer and both have a name, it needs to be clearly visible which name corresponds to which object. Sometimes grouping that in separate pages would make sens sometimes could be overkill.
1. Presentation base.
```
{
"bd": "..." # bundle digest
"d": "...",
"o": { # "pages", renamed from "containers"
"pageY": [ list of attrs1 ], #order is relevant
"pageZ": [ list of attrs2 ], #order is relevant
},
"po": [ "pageY", "pageZ" ], # pages order, order is relevant
"pl": {
"eng": {
"pageY": "Page Y"
},
"pol": {
...
}
}
}
```
1. Spatial arrangement overlay -- future topic, if ever
```
{
"pd": "...", # presentation base digest
"d": "...",
"p": {
"pageY": {
"attr1": [grid coords],
"attr2": [grid coords],
}
...
}
}
```
1. DSL for presentation
```
FOR refs/refn # ref of OCA bundle for which presentation is build
SET INTERACTION_METHOD WEB|AI
SET INTERACTION_CONTEXT CAPTURE|COLLECTION
ADD PAGE <page_name> <list of attributes>
ADD PAGE <page_name2> <list of attributes>
PAGE_ORDER <page_name> <page_name2>
ADD LABEL en PAGE <page_name> <page_label>
ADD LABEL pl PAGE <page_name> <page_label>
ADD PROPERTY <attr_name> type=textarea|signature|file
ADD PRESENTATION <ref> /* human-meaningful name */ FOR <ref> /* capture base reference */
ADD PAGE pageX attr1, attr2
ADD PAGE pageY attr4, attr3
```
```
oca-kli ... --output-presentation-file=abc.presentation
oca-kli build -p abc.presentation --push
```