SWATI GUPTA
SWATI GUPTA

Reputation: 43

ExtJS: Loading data into multiple combobox from a single json using nested model

I have the following scenario:

I have two comboboxes, with different root property.I want to load both comboboxes using same response.

Please provide some solution to accomplish this.

You can refer the fiddle for clear understanding. https://fiddle.sencha.com/#fiddle/fti

I want to load first combobox with "RetrieveRegionComboList" and second combobox with "RetrieveLanguageComboList", by loading the json only once.

In this fiddle,Iam populating the combobox by making call to JSON twice using nested store in model. I want to achieve the same by using the single response to complete multiple request.

Thank You...

Upvotes: 0

Views: 549

Answers (1)

Lorenz Meyer
Lorenz Meyer

Reputation: 19915

You can load the data in both combos like this :

First, you make an Ajax request, and in the success callback you decode the JSON and load the data into the stores.

Upvotes: 1

Related Questions