Using formLabel in FormPanel for Localization

Posted by user1782712 on Stack Overflow See other posts from Stack Overflow or by user1782712
Published on 2012-10-29T12:10:56Z Indexed on 2012/10/29 23:01 UTC
Read the original article Hit count: 225

Filed under:

I am trying to implement Localization within a panel, so to make the fieldLabel accessable from another file I am defining it like this

 Ext.define('Ext.app.detailForm', {
        extend: 'Ext.form.Panel',
        id: 'cscForm',
       // frame: true, uncomment this to show blue frame background
        title: 'CSC Details :',

        //trying
        cscCode: 'CSC Code',

        bodyPadding: 5,
        layout: 'anchor',    // Specifies that the items will now be arranged in columns
        autoScroll: true,
        //width:1200,
        //height: 300,
        collapsible: true,
        fieldDefaults: {
            labelAlign: 'left',
            msgTarget: 'side'
        },

        items: [{
            columnWidth: 0.4,
            xtype: 'container',
            layout:'anchor',
            defaults: {
                labelWidth: 150
            },
            defaultType: 'textfield',
            items: [{
            xtype: 'container',
            layout: 'hbox',
            items:[{
                xtype: 'fieldset',
                columnWidth:1.5,
                layout: 'column',
                width:1050,
                defaultType: 'textfield',
                defaults: {
                labelWidth: 150,
                margin: '3 0 0 10'
                },
                items: [{
                    fieldLabel: this.cscCode,
                    name: 'CSCCode',
                    width: 500
                }, {.....

but when I try to render this panel, the formLabel for cscCode does not display, is there some thing which I am doing wrong here?

I am basically not able to access "this.cscCode"

© Stack Overflow or respective owner

Related posts about extjs4