Results 1 to 7 of 7

Thread: FormPanel with ColumnLayout error

  1. #1
    Sencha User
    Join Date
    Oct 2007
    Location
    Iran
    Posts
    167

    Default FormPanel with ColumnLayout error

    this code return error. only in column layout

    PHP Code:
        var simple = new Ext.FormPanel({
            
    labelWidth75// label settings here cascade unless overridden
            
    url:'save-form.php',
            
    frame:true,
            
    title'Simple Form',
            
    bodyStyle:'padding:5px 5px 0',
            
    width350,
        
    layout:"column",
            
    defaults: {width230},
            
    defaultType'textfield',

            
    items: [{
                    
    fieldLabel'First Name',
                    
    name'first',
                    
    allowBlank:false
                
    },{
                    
    fieldLabel'Last Name',
                    
    name'last'
                
    },{
                    
    fieldLabel'Company',
                    
    name'company'
                
    }, {
                    
    fieldLabel'Email',
                    
    name'email',
                    
    vtype:'email'
                
    }, new Ext.form.TimeField({
                    
    fieldLabel'Time',
                    
    name'time'
                
    })
            ],

            
    buttons: [{
                
    text'Save'
            
    },{
                
    text'Cancel'
            
    }]
        });
        
    simple.render(document.body);

    simple.remove(simple.items.itemAt(4),true);
    simple.insert(4,new Ext.form.TextField({
                    
    fieldLabel'Time',
                    
    name'time'
                
    }));
    simple.doLayout();

    simple.remove(simple.items.itemAt(4),true);
    simple.insert(4,new Ext.form.TextField({
                    
    fieldLabel'Time',
                    
    name'time'
                
    }));
    simple.doLayout(); 
    No honor is like knowledge

  2. #2
    Sencha User
    Join Date
    Oct 2007
    Location
    Iran
    Posts
    167

    Default

    Oh sorry. please fix Thread title
    No honor is like knowledge

  3. #3
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    Quote Originally Posted by vahid4134 View Post
    Oh sorry. please fix Thread title
    You can edit the title yourself! And what is the error you are getting?
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  4. #4
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,232

    Default

    Quote Originally Posted by vahid4134 View Post
    Oh sorry. please fix Thread title
    I would fix the thread title if i knew what you were reporting.
    for example, what error does your code throw?

    [edit]
    i've renamed the thread title as best i could.
    i've no idea what else to call it based on the zen-like bug report.

  5. #5
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    So you specify the layout to be column but you have no columns! Commenting out the layout line will give you no errors.

    Start with this example and change it to fit your needs. This was the 3rd form in the sample provided by the Ext team. Notice that the columnWidth....

    Code:
    var top = new Ext.FormPanel({
            labelAlign: 'top',
            frame:true,
            title: 'Multi Column, Nested Layouts and Anchoring',
            bodyStyle:'padding:5px 5px 0',
            width: 600,
            items: [{
                layout:'column',
                items:[{
                    columnWidth:.5,
                    layout: 'form',
                    items: [{
                        xtype:'textfield',
                        fieldLabel: 'First Name',
                        name: 'first',
                        anchor:'95%'
                    }, {
                        xtype:'textfield',
                        fieldLabel: 'Company',
                        name: 'company',
                        anchor:'95%'
                    }]
                },{
                    columnWidth:.5,
                    layout: 'form',
                    items: [{
                        xtype:'textfield',
                        fieldLabel: 'Last Name',
                        name: 'last',
                        anchor:'95%'
                    },{
                        xtype:'textfield',
                        fieldLabel: 'Email',
                        name: 'email',
                        vtype:'email',
                        anchor:'95%'
                    }]
                }]
            },{
                xtype:'htmleditor',
                id:'bio',
                fieldLabel:'Biography',
                height:200,
                anchor:'98%'
            }],
    
            buttons: [{
                text: 'Save'
            },{
                text: 'Cancel'
            }]
        });
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  6. #6
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,258

    Default

    It was actually a bug due to the layout refactoring, but it's since been corrected.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  7. #7
    Sencha User
    Join Date
    Oct 2007
    Location
    Iran
    Posts
    167

    Default

    Hi
    Its just example
    I use Ext.ux.RowEditor and change layout to column. In My app need to change one filed if user change combo.
    if last component is combo and I try to change Combo box this error occurs.
    Code:
    b.dom is undefined
    http://localhost/ext-3.1.0/ext-all.js
    Line 7
    No honor is like knowledge

Posting Permissions

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