Sencha2 - How can I get data from Panel to child components of fieldset?

How to get data from a panel for children? I have data in the Panel record property, but I want to get to it to set the value of the text field inside the set of fields.

Ext.define('My.view.MyDetail', {
extend: 'Ext.Panel',
xtype: 'mydetail',
requires: [        
],

config: {
    refs: {
    },

    title: 'Details',
    styleHtmlContent: true,
    scrollable: 'vertical',

{
    xtype: 'fieldset',
    title: 'About You',
    instructions: 'Tell us all about yourself',
    items: [
        {
            xtype: 'textfield',
            name : 'firstName',
            label: 'First Name',
                            data?, record? how do I get something from this Panel record?
        },
...
The data is here in this.getData().firstName
    listeners: {
    show: function(list, opts){
        console.log(this.getData().firstName);
    }
}   
});
+3
source share
1 answer

add an identifier to the use: Ext.getCmp('yourID').getValue()// text box to get the value Ext.getCmp('yourID').setValue(this.getData().firstName)// to set the value

+3
source

All Articles