cancel
Showing results for 
Search instead for 
Did you mean: 

How to fullfill a combobox with more than 100 entryes?!

0 Kudos
257

This is my jason model:

jModel: new sap.ui.model.json.JSONModel(),
_data: {
requestSpecific: [],
items: [],
partner: [],
vatGroups: [],
countries: [],
totals: [],
ttlstotais: []
},

jModel.setData(this._data);

The model is fullfill with data came from SAPB1 and everything is working fine.

This is the comboBox that I need to fullfill with data, who is properly working:

<t:Column width="9rem" id="colCountriesId">
<Label text="País"/>
<t:template>
<ComboBox items="{jModel>/countries}">
<core:Item key="{jModel>code}" text="{jModel>Name}"/>
</ComboBox>
</t:template>
</t:Column>

The problem is that I've got 200 countries, and only shows me 100 (I know that this is the limit by default).

In a normal situation I make something like:

oModel.setSizeLimit(200);

The problem is that I can't solve my issue with this solution, because I don't want to increase my model, but just one property in the model, and from what I can see, I can't do this.

Can you give me some light in how to fullfill my comboBox with 200 entries in a different way?

Accepted Solutions (0)

Answers (1)

Answers (1)

mvaibhav
Contributor
0 Kudos

Hi 0022266818,

Try this in your binding, it should work

<ComboBox items="{ path:'jModel>/countries', length : 200 }">

Thanks,

Vaibhav Maheshwari

0 Kudos

Hi Vaibhav,

tks for the hint.

It works perfectly to me, just with some corrections that I will put in here.

<ComboBox id="countryId" items="{path:'jModel>/countries', length : 200 }" enabled="{jModel>/isEnabled}">
mvaibhav
Contributor
0 Kudos

Great that it works..
typo during the formatting