-
18 Oct 2012 4:17 AM #1
Unanswered: Problem with List with dynamic field in model
Unanswered: Problem with List with dynamic field in model
Hello,
I have a list that is linked with a store. This store is linked with a model.
I added fields and validation dynamically with :
for (var i = newFields.length - 1; i >= 0; i--){
MyApp.model.patientModel.prototype.fields.add(new Ext.data.Field(newFields[i]));
}
This works fine wenn I insert data (validations works and fields are added to the D
.
The problem, is that my list does not display this dynamic fields (through itemTpl). The static fields in model are displayed correctly.
Wenn I insert a new element, the dynamic fields are displayed in the list for this element.
How could I update the list so that the dynamic fields are included?
Any help is welcome
-
20 Oct 2012 7:42 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
- Answers
- 3101
You really should have your model setup with the fields you want at instantiation
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
23 Oct 2012 5:12 AM #3
Is it not possible to update the model before displaying the list?
I need to have a dynamic model for my application.


Reply With Quote