on 2017 Jun 10 3:30 PM
Hi there
I've a ComboBox that will only display 100 items. Below is my code in the controller, populating the ComboBox, but only with the first 100 items:
var oNatio = oView.byId("selPersEditNatio");
var oNatioItemSelectTemplate = new sap.ui.core.Item({
key: "{Land1}",
text: "{NatioText}"
});
this._oModel.setSizeLimit(300);
oNatio.bindItems({
path: "/CountrySet",
template: oNatioItemSelectTemplate
});
When fetching the result set, all entries are returned - this is the request from the browser:
CountrySet?$skip=0&$top=300
When checking the result of this request, all entries are in the response.
But still, only the first 100 are shown in the combo box. Any idea why that is?
Thanks in advance;
Thomas
Request clarification before answering.
In case you guys still looking for a solution for above issue.
Solution to set length in UI and in Controller
Pass length while binding the items for comboBox.
<ComboBox items="{path : 'DeliveryTimeSetModel>/',length : '500'}" id="dis_time" selectedKey="{soc_cart>DELIVERYTIME}" width="150px">
<sap.ui.core:Item text="{DeliveryTimeSetModel>Deliverytimedesc}" key="{DeliveryTimeSetModel>Deliverytime}"></sap.ui.core:Item>
</ComboBox>
Or if you want to set later in Controller
var Combobox = oView.byId("dis_time");
var oComboboxSelectTemplate =new sap.ui.core.Item({key:"{DeliveryTimeSetModel>Deliverytimedesc}",text:"{DeliveryTimeSetModel>Deliverytime}"});
oNatio.bindItems({
path:"DeliveryTimeSetModel>/",
template: oComboboxSelectTemplate,
length: 500
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
61 | |
8 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.