View Full Version : Dynamic Model

29 Jun 2014, 8:35 PM
Hey guys, i need to create dynamic model for my application. The field information is retrieved in a xml file. Please tell me the way to create dynamic model. Thanks in advance.

30 Jun 2014, 1:27 AM
There are a lot of links which discusses this:


Retrieving information from xml response should be your task, then go through these threads, surely you will get answer.

If you want something other than these, be specific

30 Jun 2014, 2:31 AM
Thanks, But still I am not able to create model dynamically. I want to know how to register a dynamically created model and store in app.js .Can you post a sample application that uses a dynamic model?

30 Jun 2014, 3:45 AM
The stackoverflow link i gave, discussed it properly.

But,If your model is dynamic(everything coming from server response), then why it will be declared inside app.js
Just give controllers and views in the app.js, control the action in controller. Something like use onRender, in control of controller, and get the xml there, parse it.
If you want grid, then create Fields and Column configurations in that function, which is getting called. set the grid columns, create store at that time only, with fields which you just got from parsing the response.....

Continue like this. This approach worked for several people including me