on 06-23-2015 11:53 AM
Hi Experts,
I wantto databind sapui5 oValueHelpDialog , I wantto databind from,
......./sap/opu/odata/sap/ZWEBDI_FIORI03_SRV/DiGoruntule?URUNTIPI='BD'&DINO='2120896'&REVNO='1'
here my controller,
var that= this; | |||
var oValueHelpDialog = new sap.ui.comp.valuehelpdialog.ValueHelpDialog({ | |||
basicSearchText: this.theTokenInput.getValue(), | |||
title: "Karakter", | |||
modal: true, | |||
supportMultiselect: true, | |||
supportRanges: true, | |||
supportRangesOnly: false, | |||
key: this.aKeys[0], | |||
descriptionKey: this.aKeys[1], |
ok: function(oControlEvent) { | ||
that.aTokens = oControlEvent.getParameter("tokens"); | ||
that.theTokenInput.setTokens(that.aTokens); | ||
oValueHelpDialog.close(); | ||
}, |
cancel: function(oControlEvent) { | ||
sap.m.MessageToast.show("Cancel pressed!"); | ||
oValueHelpDialog.close(); | ||
}, |
afterClose: function() { | ||
oValueHelpDialog.destroy(); | ||
} | ||
}); |
var oColModel = new sap.ui.model.json.JSONModel(); | ||
oColModel.setData({ | ||
cols: [ | ||
{label: "Karakter", template: "Karakter"}, | ||
{label: "Tanim", template: "Tanim"} | ||
// | , | |
// | {label: "City", template: "City"}, | |
// | {label: "Currency Code", template: "CurrencyCode"} | |
] |
}); |
oValueHelpDialog.getTable().setModel(oColModel, "columns"); |
var oRowsModel = new sap.ui.model.json.JSONModel(); | |||
oRowsModel.setData(this.aItems); | |||
oValueHelpDialog.getTable().setModel(oRowsModel); | |||
oValueHelpDialog.getTable().bindRows("/"); |
I know these example sapui5 explorer
I want to databind this table from url = ......./sap/opu/odata/sap/ZWEBDI_FIORI03_SRV/DiGoruntule?URUNTIPI='BD'&DINO='2120896'&REVNO='1'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
where is your aItems??
In that example aItems is basically the rows data and in your code you are getting it from Gateway. so according to me you don't need to write all these codes.
var oRowsModel = new sap.ui.model.json.JSONModel();
oRowsModel.setData(this.aItems);
oValueHelpDialog.getTable().setModel(oRowsModel);
oValueHelpDialog.getTable().bindRows("/");
Just write this line and use the proper path of your Gateway service.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
here in search method you need to call oData and do valuehelp table binding,
oValueHelpDialog.setFilterBar(new sap.ui.comp.filterbar.FilterBar({
advancedMode: true,
filterItems: [new sap.ui.comp.filterbar.FilterItem({ name: "s1", control: new sap.m.Input()})],
filterGroupItems: [new sap.ui.comp.filterbar.FilterGroupItem({ groupTitle: "foo", groupName: "gn1", name: "n1", label: "Company Code", control: new sap.m.Input()}),
new sap.ui.comp.filterbar.FilterGroupItem({ groupTitle: "foo", groupName: "gn1", name: "n2", label: "Company Name", control: new sap.m.Input()}),
new sap.ui.comp.filterbar.FilterGroupItem({ groupTitle: "foo", groupName: "gn1", name: "n3", label: "Currency Code", control: new sap.m.Input()})],
search: function() {
sap.m.MessageToast.show("Search pressed");
}
}));
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.