Results 1 to 2 of 2

Thread: (DataItem) Is record.get the same as record.data?

  1. #1
    Sencha User
    Join Date
    Mar 2013
    Posts
    18
    Vote Rating
    2
      0  

    Default (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.

    Thanks!

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      0  

    Default

    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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •