I have a little Problem with SAPUI5. I have the following Code:
var oModel = new sap.ui.model.json.JSONModel();
oModel.loadData("JSON/saplogon.json");
var oTable = new sap.ui.table.Table({
visibleRowCount: 30,
firstVisibleRow: 0
});
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Server"}),
template: new sap.ui.commons.TextView().bindProperty("text", "Server"),
width: "40%"
}));
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Beschreibung"}),
template: new sap.ui.commons.TextView().bindProperty("text", "Description"),
width: "40%"
}));
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Adresse"}),
template: new sap.ui.commons.TextView().bindProperty("text", "Address"),
width: "10%"
}));
oTable.addColumn(new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "SystemID"}),
template: new sap.ui.commons.TextView().bindProperty("text", "mssysname"),
width: "10%"
}));
oTable.setModel(oModel);
oTable.bindRows({
path: "/Systeme",
filter: allFilter
});
oPage_Results.addContent(oTable);
the Code above works but when I change the directory of the .JSON File to a Directory on my Server it wont work, I have also tried to get the data from another Server with JSONP but that also wont work, can anybody please help me to find a way for consuming a local JSON file from my server which is not in my package.
Thank you very much guys