To create a new destination in the SAP BTP Trial account for northwind service, go to the Destinations tab and click on the New Destination button. Enter the details as in the below image and click on Save.
Once the destination is created, we need to test it to ensure its working properly. Click on the Check connection button for the same. If you get the popup as in the below image everything is going as planned.
Click Next as in the image above.
Click the Finish button to create the application. Once done your workplace may look something as below.
The first test run of the application may take some time. Finally if the application looks something as below, then things are on the right track.
<Table
id="table"
width="auto"
items="{
path: '/Employees',
sorter: {
path: 'EmployeeID',
descending: false
}
}"
inset="true"
noDataText="{worklistView>/tableNoDataText}"
busyIndicatorDelay="{worklistView>/tableBusyDelay}"
growing="true"
growingScrollToLoad="true"
updateFinished=".onUpdateFinished">
<headerToolbar>
<OverflowToolbar id="_IDGenOverflowToolbar1">
<Title
id="tableHeader"
text="{worklistView>/worklistTableTitle}"
level="H3"/>
<ToolbarSpacer id="_IDGenToolbarSpacer1" />
<Button id="_IDGenButton1" icon="sap-icon://action-settings" press="onPersoButtonPressed" />
</OverflowToolbar>
</headerToolbar>
<columns>
<Column id="_IDGenColumn1">
<Text id="_IDGenText11" text="Employee ID"/>
</Column>
<Column id="_IDGenColumn2">
<Text id="_IDGenText12" text="Title of Courtesy"/>
</Column>
<Column id="_IDGenColumn3">
<Text id="_IDGenText13" text="FirstName"/>
</Column>
<Column id="_IDGenColumn4">
<Text id="_IDGenText14" text="LastName"/>
</Column>
<Column id="_IDGenColumn5">
<Text id="_IDGenText15" text="Title"/>
</Column>
<Column id="_IDGenColumn6">
<Text id="_IDGenText16" text="Address"/>
</Column>
<Column id="_IDGenColumn7">
<Text id="_IDGenText17" text="Region"/>
</Column>
<Column id="_IDGenColumn8">
<Text id="_IDGenText18" text="City"/>
</Column>
<Column id="_IDGenColumn9">
<Text id="_IDGenText19" text="Postal Code"/>
</Column>
<Column id="_IDGenColumn10">
<Text id="_IDGenText20" text="Country"/>
</Column>
<Column id="_IDGenColumn11">
<Text id="_IDGenText21" text="Home Phone"/>
</Column>
<Column id="_IDGenColumn12">
<Text id="_IDGenText22" text="Extension"/>
</Column>
<Column id="_IDGenColumn13">
<Text id="_IDGenText23" text="BirthDate"/>
</Column>
<Column id="_IDGenColumn14">
<Text id="_IDGenText24" text="HireDate"/>
</Column>
</columns>
<items>
<ColumnListItem id="_IDGenColumnListItem1"
type="Navigation"
press=".onPress">
<cells>
<ObjectIdentifier id="_IDGenObjectIdentifier1"
title="{EmployeeID}"/>
<Text id="_IDGenText8" text="{TitleOfCourtesy}"/>
<Text id="_IDGenText1" text="{FirstName}"/>
<Text id="_IDGenText2" text="{LastName}"/>
<Text id="_IDGenText6" text="{Title}"/>
<Text id="_IDGenText3" text="{Address}"/>
<Text id="_IDGenText4" text="{Region}"/>
<Text id="_IDGenText5" text="{City}"/>
<Text id="_IDGenText10" text="{PostalCode}"/>
<Text id="_IDGenText31" text="{Country}"/>
<Text id="_IDGenText7" text="{HomePhone}"/>
<Text id="_IDGenText9" text="{Extension}"/>
<Text id="_IDGenText32" text="{BirthDate}"/>
<Text id="_IDGenText33" text="{HireDate}"/>
</cells>
</ColumnListItem>
</items>
</Table>
// init and activate Table Personalization Control
this._oTPC = new TablePersoController({
table: this.byId("table"),
//specify the first part of persistence ids e.g. 'demoApp-productsTable-dimensionsCol'
componentName: "demoApp",
persoService: DemoPersoService
}).activate();
onExit: function () {
this._oTPC.destroy();
},
onPersoButtonPressed: function (oEvent) {
this._oTPC.openDialog();
},
sap.ui.define(['jquery.sap.global'],
function(jQuery) {
"use strict";
// Very simple page-context personalization
// persistence service, not for productive use!
var DemoPersoService = {
//Getter for Table Personalization data
getPersData : function () {
var oDeferred = new jQuery.Deferred();
if (!this._oBundle) {
this._oBundle = this.oData;
}
oDeferred.resolve(this._oBundle);
// setTimeout(function() {
// oDeferred.resolve(this._oBundle);
// }.bind(this), 2000);
return oDeferred.promise();
},
//Setter for Table Personalization data
setPersData : function (oBundle) {
var oDeferred = new jQuery.Deferred();
this._oBundle = oBundle;
oDeferred.resolve();
return oDeferred.promise();
},
};
return DemoPersoService;
});
sap.ui.define([
"./BaseController",
"sap/ui/model/json/JSONModel",
"../model/formatter",
"sap/ui/model/Filter",
"sap/ui/model/FilterOperator",
"sap/m/TablePersoController",
"./DemoPersoService"
], function (BaseController, JSONModel, formatter, Filter, FilterOperator, TablePersoController, DemoPersoService) {
"use strict";
Let's now run the application and open the settings icon to manage the fields visibility. Select the fields as needed and select Ok.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 |