Results 1 to 3 of 3

Thread: FormPanel is not displaying fieldset and fields

  1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    85

    Default FormPanel is not displaying fieldset and fields

    I'm confused on why my formPanel won't render the fieldset or the fields. When I add this to my TabPanel, I am correctly seeing the tab with the title set, toolbar rendered correctly, but nothing else. Through Chrome's debugger I have verified that buildDetailItemArray() is being called, so I am confused as to what I am doing wrong.

    Code:
    MyApp.panels.RelationshipDetails = Ext.extend(Ext.FormPanel, {
        closable: true,
        relationshipId: null,
        documentId: null,
        title: 'Relationship',
        initComponent: function () {
            if (!this.verifyRequiredData()) {
                MyApp.panels.RelationshipDetails.superclass.initComponent.call(this);
                return;
            }
    
            // Build components
            this.tbar = this.buildToolbar();
            this.items = this.buildDetailItemArray();
    
            MyApp.panels.RelationshipDetails.superclass.initComponent.call(this);
        },
    
        verifyRequiredData: function () {
            // Verification code here
        },
    
        buildDetailItemArray: function () {
            return [{
                xtype: 'fieldset',
                title: 'Details',
                collapsible: true,
                autoHeight: true,
                items: [{
                    xtype: 'hidden',
                    name: 'Id'
                }, {
                    xtype: 'textfield',
                    fieldLabel: 'Name',
                    name: 'Name'
                }, {
                    xtype: 'textfield',
                    fieldLabel: 'Description',
                    name: 'Description'
                }, {
                    xtype: 'button',
                    text: 'Save',
                    name: 'saveButton'
                }]
            }];
        },
    
        buildToolbar: function () {
            return new Ext.Toolbar({
                // Toolbar Config
            });
        }
    });

  2. #2
    Sencha User
    Join Date
    Nov 2010
    Posts
    85

    Default

    After doing more debugging I am even more confused.

    If I comment out the this.tbar line, the items show correctly. As long as this.tbar is being set though, the form does not show. Anyone have any insight into why?

  3. #3
    Sencha User
    Join Date
    Nov 2010
    Posts
    85

    Default

    If anyone is interested, this issue was caused because my Panel had no height specified. By adding autoHeight: true into the config, everything works correctly!

Similar Threads

  1. Replies: 0
    Last Post: 20 Jul 2010, 12:33 AM
  2. Fields are not displaying in IE and FF
    By Scotch in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 29 Sep 2008, 1:42 AM
  3. Text not displaying in a fieldset
    By J.B in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 12 Apr 2008, 6:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •