cancel
Showing results for 
Search instead for 
Did you mean: 

binding JSON file with SAPUI5

0 Kudos

Hello,

i have this JSON file as Model, i would to use it in my view.xml, i think my binding is falsh.

My JSON file:

{
	"Rowsets": {
		"DateCreated": "2019-01-22T14:37:43",
		"Version": "15.1 SP6 Patch 7 (19.02.2018)",
		"StartDate": "2019-01-22T13:37:43+0100",
		"EndDate": "2019-01-22T14:37:43+0100",
		"CachedTime": "",
		"Rowset": [{
			"Columns": {
				"Column": [{
					"Name": "outputJSON",
					"SourceColumn": "outputJSON",
					"Description": "",
					"SQLDataType": 1,
					"MinRange": 0.0,
					"MaxRange": 0.0
				}]
			},
			"Row": [{
				"outputJSON": "[{\n            \"ID\": \"1\",\n            \"ReportingSubAreaId\": 1,\n            \"TileDescription\": \"New\",\n            \"Link\": \"http://wbmeq:50000/XMII/CM/Sandbox/Test.html\",\n            \"___FK_fffa8c7e9783ecb410ad6c78_00005\": \"1\"\n}, {\n            \"ID\": \"2\",\n            \"ReportingSubAreaId\": 2,\n            \"TileDescription\": \"nach Farbe\",\n            \"Link\": \"http://google.de\",\n            \"___FK_fffa8c7e9783ecb410ad6c78_00005\": \"2\"\n}, {\n            \"ID\": \"3\",\n            \"ReportingSubAreaId\": 3,\n            \"TileDescription\": \"Output Stück\",\n            \"Link\": \"http://wetter.de\",\n            \"___FK_fffa8c7e9783ecb410ad6c78_00005\": \"3\"\n}, {\n            \"ID\": \"4\",\n            \"ReportingSubAreaId\": 4,\n            \"TileDescription\": \"Output\",\n            \"Link\": \"http://amazon.de\",\n            \"___FK_fffa8c7e9783ecb410ad6c78_00005\": \"4\"\n}]"
			}]
		}]
	}
}

My View:

	<Text xmlns="sap.m" text="{JSON>/Rowsets/Rowset/Row/0/TileDescription}" id="text2"/>

Manifest.json:


	"models": {
			"i18n": {
				"type": "sap.ui.model.resource.ResourceModel",
				"settings": {
					"bundleName": "DemoProject2DemoProject2.i18n.i18n"
				}
			},
		
			"JSON": {
					"type": "sap.ui.model.json.JSONModel",
					"uri": "model/FormData.json"
			}
				},

the Text does not return anything.

Regards

Khaled

Accepted Solutions (0)

Answers (0)