21 Mar 2013 9:49 AM #1
Unanswered: (DataItem) Is record.get the same as record.data?
I noticed in the updateRecord function that i can handle my data using either record.get('someField') or record.data.someField. Are they both the same or record.data.someField more static?
I created some DataItems so that several components would keep up to date with the changes to the database auto-magically.
My issue is that all of my models have associations (nestled fields). In order for me to iterate through the nestled fields to build my components, I've been using record.data. I haven't figured out the equivalent record.get command.
I just want to be sure that using the record.data nomenclature will allow for the components to dynamically update the same way as record.get would.
23 Mar 2013 5:34 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
They both will function the same. You could technically change the data property to another name and that's where the get method will handle it.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.