Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Selector or ComboBox does not display all JSON in SAPUI5

I have a JSON of countries and what I want is to show them in a combobox or selector all the attributes of the json but it only shows me 99, it is as if it was dividing the array, is there any way to solve this? my json has about 200 attributes. This is a small part of the json:

{
  "countries": [
    {
      "name_en": "Afghanistan",
      "name_es": "Afganistán",
      "nationality_en": "Afghan",
      "nationality_es": "Afgano/a",
      "dial_code": "+93",
      "code": "af"
    },
    {
      "name_en": "Albania",
      "name_es": "Albania",
      "nationality_en": "Albanian",
      "nationality_es": "Albano/a",
      "dial_code": "+355",
      "code": "al"
    },
    {
      "name_en": "Algeria",
      "name_es": "Argelia",
      "nationality_en": "Algerian",
      "nationality_es": "Argelino/a",
      "dial_code": "+213",
      "code": "dz"
    }
]}

this is the view:

<Label class="label" text="{i18n>Nationality}" required="true"/>
<ComboBox id="comboNationality" placeholder="{i18n>Nationality}" class="input" width="100%" required="true" tooltip="{i18n>SelectNationality}" items="{ path: 'country>/Dato' }">
    <core:ListItem key="{country>code}" text="{country>nationality}"/>
</ComboBox>

any idea why it cuts the json?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

JSONModel has a default size of 100 elements. You can use setSizeLimit method to change this behavior

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading