extjs - Can i make a to json from datasource? -


i have json file:

[{ "text": "company", "id": "100", "leaf": false, "cls": "folder", "expanded": true, "children": [{     "text": "children level 1 1",     "id": "02",     "leaf": false,     "cls": "folder",     "expanded": false,     "children": [{         "text": "children level 2 1",         "id": "02.02",         "leaf": false,         "cls": "folder",         "children": [{             "text": "children level 3 1",             "id": "02.02.01",             "leaf": true,             "cls": "file"         }, {             "text": "children level 3 2",             "id": "02.02.02",             "leaf": true,             "cls": "file"         }]      }]     }]   }] 

in extjs application have 3 comboboxes. want fill first combo "childrens level one". next combo "childrens level two" etc. if select "childrens level 1 1" in first combo want second combo filling "childrens level two" "children level 1 1". in example "children level 2 1". can somehow make query json file?

one approach might load json data , load separate stores. "child" store's model have "parent" property stores id of parent node. then, on beforequery event of dependent combobox filter dependent store selected id in parent combobox. pretty encapsulate logic have n number of nested, related comboboxes.

you flatten json nodes same level, "parentid" values nested nodes. use 1 store, still able filter selected values.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -