I'm building an MVC application in ExtJs 4.2 and there is a window and a formpanel.
Form panel has few hidden textfields which i want to show/hide.
When I run this commands:
Ext.getCmp('PartsSell').show();
or
Ext.getCmp('PartsSell').setVisible(true);
even
Ext.widget('ObjectForm').getForm().findField('PartsSell').setVisible(true);
nothing is happening!!
Here is formpanel snippet:
Ext.define('crm.view.ObjectForm', {
    extend      : 'Ext.form.Panel',
    header      : false,
    alias       : 'widget.ObjectForm',
    url         : 'action.php',
    id          : "ObjectForm",
    defaultType : 'textfield',
    initComponent: function() {
        Ext.apply(this, {
            items   : [
            {
                            fieldLabel  : 'label',
                            labelWidth  : 115,
                            hidden      : true,
                            allowBlank  : true,
                            name        : 'PartsSell',
                            itemId      : 'PartsSell',
                            xtype       : 'textfield',
                            vtype       : 'DigitsVtype',
                            width       : 150,
                            padding     : '0 0 0 15'
            },
            /* other stuff */]
        } );
        this.callParent(arguments);
    }
} );
FF/chrome console behaves like everything is OK.
If i set 'hidden' param to 'false' the field is shown.
According to Tarabass and Drake advices:
I've changed id on itemId.
And now i can trigger field by
Ext.ComponentQuery.query('#PartsSell')[0].hide() / .show();
 
     
    