I try to bind the follwoing json with pattern or formatter:
{
"d": {
"__metadata": {
"id": "http://xxx/sap/opu/odata/sap/ZWM_MDE_SRV_03/BESTSet(Ebeln='45',Lgnum='110')",
"uri": "xxx/sap/opu/odata/sap/ZWM_MDE_SRV_03/BESTSet(Ebeln='45',Lgnum='110')",
"type": "ZWM_MDE_SRV_03.BEST"
},
"Ebeln": "45",
"Lgnum": "110",
"Lgort": "1200",
"Bestdat": "\/Date(1512086400000)\/",
"Lfdat": "\/Date(1512086400000)\/",
"Bktxt": ""
}
}
If I do like this, it works:
<Text text="{/d/Bestdat}" />
But if I do like this, it shows nothing
<Text text="{
path: '/d/Bestdat',
type: 'sap.ui.model.type.Date',
formatOptions: {
pattern: 'yyyy/MM/dd'
}
}" />
Model is bound on the view (not on the form):
var oModel = new sap.ui.model.json.JSONModel(url, true);
this.getView().setModel(oModel);