Results 1 to 5 of 5

Thread: PR2 - Fields in form panel but not in fieldset don't display.

  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    127
    Answers
    4
    Vote Rating
    0
      0  

    Exclamation PR2 - Fields in form panel but not in fieldset don't display.

    I am finding that fields in a formpanel that are not in a fieldset are not displaying in PR2. Can anyone spot an error in my code below or is it a PR2 bug?

    Code:
    Ext.application({
        name: '2.0 PR2 Form Test',
    
    
        launch: function() {
            console.log('launch:');
    
    
            var myPanel = Ext.create("Ext.Panel", {
                fullscreen: true,
                layout: 'vbox',
                items: [
                {
                    title: 'Basic',
                    xtype: 'formpanel',
                    id: 'basicform',
                    layout: {
                        type: 'vbox',
                        align: 'stretch'
                    },
                    // xtype: 'fieldset',
                    // title: 'Personal Info',
                    // defaults: {
                    //  labelWidth: '35%'
                    //  },
                    items: [
                    {
                        xtype: 'textfield',
                        name: 'first',
                        label: 'First'
                    },
                    {
                        xtype: 'textfield',
                        name: 'last',
                        label: 'Last'
                    }
                    ]
                }
                ]
            });
            console.log('myPanel=' + myPanel);
            // var tf = new Ext.field.Text();
            // tf.setLabel("hello");
            // myPanel.add(tf);
        }
    });

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      0  

    Default

    Is this due to using vbox?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Ext GWT Premium Member
    Join Date
    Apr 2009
    Location
    NYC
    Posts
    112
    Answers
    2
    Vote Rating
    1
      0  

    Default

    I actually had something similar. Not that they wouldnt display, but they wouldn't have a "white" background where the actual input was. Labels rendered fine, but the actual input didn't have it's box.

  4. #4
    Sencha User
    Join Date
    Oct 2011
    Posts
    127
    Answers
    4
    Vote Rating
    0
      0  

    Default

    I was loading the wrong sencha touch javascript file and somehow the browser/simulator was using the old cached version. Now I'm using the correct file but I am encountering much bigger issues as my app doesn't display at all.

  5. #5
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      0  

    Default

    The name config of Ext.application is the root of your namespacing. Example:

    Code:
    Ext.application({
        name : 'MyApp',
    
        ....
    });
    Sets up the namespaces:

    MyApp.controller = {};
    MyApp.model = {};
    MyApp.store = {};
    MyApp.view = {};

    Code:
    Ext.application({
        name : 'Sencha',
    
        ....
    });
    Sets up the namespaces:

    Sencha.controller = {};
    Sencha.model = {};
    Sencha.store = {};
    Sencha.view = {};

    So based on the name you specify, your views should all go into [Name].view[ClassName]
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Posting Permissions

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