Results 1 to 4 of 4

Thread: form.panel loadRecord problem

  1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    33
    Vote Rating
    0
      0  

    Default Answered: form.panel loadRecord problem

    I have a Partner model which has a PostAddress belongsTo relationship.

    I can name textfields according to Partner properties like:
    xtype: 'textfield',
    id: 'name', /bind to partner object name property
    name: 'name'

    thats ok, calling loadRecord on form with partner parameter fields are filled up by partner properties.

    but, I cant bind partner's PostAddress properties, because it wont work:
    xtype: 'textfield',
    id: 'postaddress.streetname',
    name: ''postaddress.streetname'

    what is the correct way to do this?

  2. Quote Originally Posted by ultra2 View Post
    ok, and what to do in a grid, as I cant set a gridcolumn's dataIndex property like 'postaddress.streetname'?
    If the data is still on the record, then you can use a renderer on the column.

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

    Default

    You would have to get the associated data and use loadRecord or setValues with that.
    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

  4. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    33
    Vote Rating
    0
      0  

    Default

    ok, and what to do in a grid, as I cant set a gridcolumn's dataIndex property like 'postaddress.streetname'?

  5. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    Quote Originally Posted by ultra2 View Post
    ok, and what to do in a grid, as I cant set a gridcolumn's dataIndex property like 'postaddress.streetname'?
    If the data is still on the record, then you can use a renderer on the column.
    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
  •