1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    33
    Vote Rating
    0
    ultra2 is on a distinguished road

      0  

    Default Answered: form.panel loadRecord problem

    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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,652
    Vote Rating
    901
    Answers
    3575
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You would have to get the associated data and use loadRecord or setValues with that.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    33
    Vote Rating
    0
    ultra2 is on a distinguished road

      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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,652
    Vote Rating
    901
    Answers
    3575
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      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 @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1