Extjs checkboxfield not rendering in Apache Tomcat

260 Views Asked by At

We are using tomcat 6.0.36 and trying to do simple check box example but check boxes are not rendered rest everything working fine

All the text rendered properly, i have created some pages with tabs, forms and grids all pages rendering except checkboxes in them.

Ext.onReady(function() {
  Ext.QuickTips.init();

var fsf = Ext.create('Ext.form.Panel', {
    url:'save-form.php',
    frame:true,
    title: 'Simple Form with FieldSets',
    bodyStyle:'padding:5px 5px 0',
    width: 350,
    fieldDefaults: {
    msgTarget: 'side',
    labelWidth: 75
    },
    defaults: {
    anchor: '100%'
    },

    items: [{
    xtype:'fieldset',
    checkboxToggle:true,
    title: 'User Information',
    defaultType: 'textfield',
    collapsed: true,
    layout: 'anchor',
    defaults: {
        anchor: '100%'
    },
    items :[{
        fieldLabel: 'First Name',
        name: 'first',
        allowBlank:false
    },{
        fieldLabel: 'Last Name',
        name: 'last'
    },{
        fieldLabel: 'Company',
        name: 'company'
    }, {
        fieldLabel: 'Email',
        name: 'email',
        vtype:'email'
    }]
    },{
    xtype:'fieldset',
    title: 'Phone Number',
    collapsible: true,
    defaultType: 'textfield',
    layout: 'anchor',
    defaults: {
        anchor: '100%'
    },
    items :[{
        fieldLabel: 'Home',
        name: 'home',
        value: '(888) 555-1212'
    },{
        fieldLabel: 'Business',
        name: 'business'
    },{
        fieldLabel: 'Mobile',
        name: 'mobile'
    },{
        fieldLabel: 'Fax',
        name: 'fax'
    }]
    }],

    buttons: [{
    text: 'Save'
    },{
    text: 'Cancel'
    }],
    renderTo: 'build-dynaForm'
})
});

Thanks in advance

Raj

1

There are 1 best solutions below

0
Vlad On

On your form no checkboxes. If you add them, they will be displayed:

    {
        fieldLabel: 'Checkbox',
        xtype: 'checkbox',
        name: 'name1'
    },{
        fieldLabel: 'Checkbox',
        xtype: 'checkbox',
        name: 'name2'
    },{
        fieldLabel: 'Checkbox',
        xtype: 'checkbox',
        name: 'name3'
    }

See http://jsfiddle.net/3FBzM/