We are using JSON views in openUI5 in the sapUI5 explored demo they use this xml view for their grouped list
<mvc:View
controllerName="sap.m.sample.ListGrouping.List"
xmlns:l="sap.ui.layout"
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m">
<List
items="{
path: '/ProductCollection',
sorter: {
path: 'SupplierName',
descending: false,
group: true
},
groupHeaderFactory: '.getGroupHeader'
}"
headerText="Products" >
<StandardListItem
title="{Name}"
description="{ProductId}"
icon="{ProductPicUrl}"
iconDensityAware="false"
iconInset="false" />
</List>
</mvc:View>
We translated it to this json view but the sorter and the header factory is ignored. The items are displayed as expected
{
"Type": "sap.ui.core.mvc.JSONView",
"controllerName": "company.controller.XY",
"content": [
{
"Type" : "sap.m.List",
"height" : "100%",
"items" : {
"path" : "/ProductCollection",
"sorter" : {
"path" : "SupplierName",
"descending" : false,
"group" : true
},
"groupHeaderFactory" : ".getGroupHeader",
"template" : {
"Type" : "sap.m.StandardListItem",
"title" : "{Name}",
"description" : "{ProductId}",
"icon" : "{ProductPicUrl}",
"iconDensityAware" : false,
"iconInset" : false
}
}
}
]
}
How to transform the xml view to a json view? Is there any tool out there which is doing this automaticly?