1. Create a sheet SH01 (qId is SH01).
The client sends:
{
"jsonrpc": "2.0",
"id": 1,
"method": "CreateObject",
"handle": 1,
"params": [
{
"title": "Sheet 1",
"description": "Description of sheet 1",
"qInfo": {
"qId": "SH01",
"qType": "sheet"
},
"qChildListDef": {
"qData": {
"title": "/title",
"description": "/description",
"meta": "/meta",
"order": "/order",
"type": "/qInfo/qType",
"id": "/qInfo/qId",
"lb": "/qListObjectDef",
"hc": "/qHyperCubeDef"
}
}
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "GenericObject",
"qHandle": 2
},
"qInfo": {
"qId": "SH01",
"qType": "sheet"
}
},
"change": [
2
]
}
The sheet is created and has 2 as a handle.
2. Create a list object LB01 (qId is LB01) in the sheet SH01.
The list object has one field Country (qFieldDefs is Country).
The client sends:
{
"jsonrpc": "2.0",
"id": 2,
"method": "CreateChild",
"handle": 2,
"params": [
{
"qInfo": {
"qId": "LB01",
"qType": "ListObject"
},
"qListObjectDef": {
"qStateName": "$",
"qLibraryId": "",
"qDef": {
"qFieldDefs": [
"Country"
],
"qFieldLabels": [
"Country Label"
],
"qSortCriterias": [
{
"qSortByLoadOrder": 1
}
]
},
"qInitialDataFetch": [
{
"qTop": 0,
"qHeight": 1,
"qLeft": 0,
"qWidth": 1
}
]
},
"title": "A list object",
"description": "Description of the list object"
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"qReturn": {
"qType": "GenericObject",
"qHandle": 3
},
"qInfo": {
"qId": "LB01",
"qType": "ListObject"
}
},
"change": [
3
]
}
The list object is created and has 3 as a handle.
3. Get the properties of the list object (handle is 3).delta is set to true to initiate the delta.
The client sends:
{
"jsonrpc": "2.0",
"id": 3,
"method": "GetProperties",
"handle": 3,
"delta": true,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 3,
"delta": true,
"result": {
"qProp": [
{
"op": "add",
"path": "/",
"value": {
"qInfo": {
"qId": "LB01",
"qType": "ListObject"
},
"qMetaDef": {},
"qListObjectDef": {
"qStateName": "$",
"qDef": {
"qGrouping": "N",
"qFieldDefs": [
"Country"
],
"qFieldLabels": [
"Country Label"
],
"qSortCriterias": [
{
"qSortByLoadOrder": 1,
"qExpression": {}
}
],
"qNumberPresentations": []
},
"qFrequencyMode": "N",
"qInitialDataFetch": [
{
"qLeft": 0,
"qTop": 0,
"qWidth": 1,
"qHeight": 1
}
],
"qExpressions": []
},
"title": "A list object",
"description": "Description of the list object"
}
}
]
}
}
Since there was no previous call to GetLayout with delta set to true, the delta is made between "nothing" and the current layout of the list object, which is add list object.
4. Set some new properties. Replace the title and the description.
The client sends:
{
"jsonrpc": "2.0",
"id": 4,
"method": "SetProperties",
"handle": 3,
"params": [
{
"qInfo": {
"qId": "",
"qType": "ListObject"
},
"qListObjectDef": {
"qStateName": "$",
"qLibraryId": "",
"qDef": {
"qFieldDefs": [
"Country"
],
"qFieldLabels": [
"Country Label"
],
"qSortCriterias": [
{
"qSortByLoadOrder": 1
}
]
},
"qInitialDataFetch": [
{
"qTop": 0,
"qHeight": 1,
"qLeft": 0,
"qWidth": 1
}
]
},
"title": "New title of the list object",
"description": "New description of the list object"
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 4,
"result": {},
"change": [
3
]
}
5. Get the delta of the properties .
The client sends:
{
"jsonrpc": "2.0",
"id": 5,
"method": "GetProperties",
"handle": 3,
"delta": true,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 5,
"delta": true,
"result": {
"qProp": [
{
"op": "replace",
"path": "/title",
"value": "New title of the list object"
},
{
"op": "replace",
"path": "/description",
"value": "New description of the list object"
}
]
}
}
Only the properties that have been added, replaced and/or removed since the last GetLayout are returned.