{
"welcomeFile": "/index.html",
"authenticationMethod": "route",
"logout": {
"logoutEndpoint": "/do/logout"
},
"routes": [
{
"source": "^/orderentry/(.*)$",
"target": "$1",
"authenticationType": "none",
"destination": "orderentry",
"csrfProtection": false
},
{
"source": "^(.*)$",
"target": "$1",
"service": "html5-apps-repo-rt",
"authenticationType": "xsuaa"
}
]
}
getData : function(){
var that = this;
$.ajax({
url: "orderentry/customers?$format=json",
contentType: "application/json",
type: 'GET',
dataType: "json",
async: false,
success: function (response) {
var oModel = new sap.ui.model.json.JSONModel(response.d.results);
that.getView().byId("order").setModel(oModel);
},
error: function (error) {
sap.m.MessageToast.show("Error");
}
});
}
<mvc:View controllerName="order.order.controller.View1" xmlns:mvc="sap.ui.core.mvc" displayBlock="true" xmlns="sap.m">
<Shell id="shell">
<App id="app">
<pages>
<Page id="page" title="{i18n>title}">
<content>
<Button text="Get Data" press="getData" type="Emphasized"></Button>
<Table id="order" items="{path: '/'}">
<columns>
<Column hAlign="Center" vAlign="Middle">
<Text text="CUSTOMER ID" />
</Column>
<Column hAlign="Center" vAlign="Middle">
<Text text="CITY ID" />
</Column>
<Column hAlign="Center" vAlign="Middle">
<Text text="COUNTRY ID" />
</Column>
<Column hAlign="Center" vAlign="Middle">
<Text text="REGION ID" />
</Column>
<Column hAlign="Center" vAlign="Middle">
<Text text="CUSTOMER" />
</Column>
<Column hAlign="Center" vAlign="Middle">
<Text text="CITYNAME" />
</Column>
<Column hAlign="Center" vAlign="Middle">
<Text text="COUNTRYNAME" />
</Column>
<Column hAlign="Center" vAlign="Middle">
<Text text="REGIONNAME" />
</Column>
</columns>
<items>
<ColumnListItem>
<cells>
<Text text="{CUSTOMERID}" />
<Text text="{CITYID}" />
<Text text="{COUNTRYID}" />
<Text text="{REGIONID}" />
<Text text="{CUSTOMER}" />
<Text text="{CITYNAME}" />
<Text text="{COUNTRYNAME}" />
<Text text="{REGIONNAME}" />
</cells>
</ColumnListItem>
</items>
</Table>
</content>
</Page>
</pages>
</App>
</Shell>
</mvc:View>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
32 | |
24 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |