json - Populate the tabs and the form in each tab dynamically -


i extracting data server , data need create number of tabs , populate data in form of each tab.

for e.g.: if data has 2 fields named 'x' , 'y' need create 2 tabs (where form panel, meaning fields inside tab, same) , need populate these fields appropriate data.

populating data fine need know how add tabs dynamically according json object get. name of tab i'll getting json object.

edit: json looks this:

{     ..     events : {         'x joined' : {             ..         }         'y joined' : {             ..         }     } } 

now need 2 tabs named 'x joined' , 'y joined' '..' giving data populate inside tabs.

if have tabpanel can use method add add new tab.

to know names of object, use js keys method on object obtained json.

it :

for(var prop in myobject)     mytabpanel.add(ext.define("tab", {title: prop})); 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -