PDA

View Full Version : form.panel loadRecord problem



ultra2
6 Nov 2011, 1:12 AM
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?

mitchellsimoens
6 Nov 2011, 6:56 AM
You would have to get the associated data and use loadRecord or setValues with that.

ultra2
7 Nov 2011, 1:39 AM
ok, and what to do in a grid, as I cant set a gridcolumn's dataIndex property like 'postaddress.streetname'?

mitchellsimoens
7 Nov 2011, 6:22 AM
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.