Results 1 to 5 of 5

Thread: fileuploadfield problem

  1. #1

    Default fileuploadfield problem

    Hello. I have problem - when i trying to create Tab with "fileuploadfield", i get en error in FireBug:
    b[d.xtype || e] is not a constructor[IMG]chrome://firebug/content/blank.gif[/IMG]Ext.DomHelper=function(){var s=null,j=/^...b.stopEvent();this.completeEdit()}}}});\n
    ext-all.js (line 7)
    Code:
    Code:
    function addDocTab(tTitle, tID) {
        Ext.getCmp('mainTabPanel').add({
            title: tTitle,
            id: tID+'_tab',
            bodyStyle: 'padding:5px 5px 0',
            closable: true,
            autoScroll: true,
            
            items:[
                new Ext.FormPanel({
                    fileUpload: true,
                    frame: true,
                    border: false,
                    items: [{
                            border: false,
                            layout: 'form',
                            items: [{
                                xtype:'textfield',
                                fieldLabel: '????????',
                                name: 'first',
                                anchor:'100%'
                            },{
                                border: false,
                                xtype: 'fileuploadfield',
                                id: 'form-file',
                                emptyText: 'Select an image',
                                fieldLabel: 'Photo',
                                name: 'photo-path',
                                buttonText: '',
                                buttonCfg: {
                                iconCls: 'upload-icon'
                                }
                            }]
                        },{
                        layout: 'column',
                        border: false,
                        items:[{
                            border: false,
                            columnWidth: .5,
                            layout: 'form',
                            items: [{
                                xtype: 'textfield',
                                fieldLabel: '????',
                                name: 'first',
                                anchor: '95%'
                            }]
                        },{
                            border: false,
                            columnWidth: .5,
                            layout: 'form',
                            items: [{
                                xtype: 'datefield',
                                fieldLabel: '????',
                                format: 'd.m.Y',
                                name: 'last',
                                anchor: '100%'
                            }]
                        }]
                    },{
                        xtype: 'htmleditor',
                        id: 'bio',
                        fieldLabel: 'Biography',
                        height: 300,
                        width: Ext.getCmp('mainTabPanel').getWidth() - 13
                        //anchor: '95%'
                    }],
    
                    buttons: [{
                        text: 'Save'
                    },{
                        text: 'Cancel'
                    }]
                })
            ]
        }).show();
    }
    If delete xtype: 'fileuploadfield', all works.Is this bag or some mistake in my code? Would be grateful for any help.
    P.S.: Sorry for my bad English. =/

  2. #2

    Default

    If some one will have same problem - include FileUploadField.js file (examples/ux/FileUploadField.js).

  3. #3
    Sencha User VinylFox's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,501

    Default

    The key part in that error message was the reference to xtype...

    b[d.xtype || e] is not a constructor

    So what this is saying is "you told me to create a component that doesn't exist"

  4. #4

    Default

    Why are these extensions housed in the examples directory? If we're meant to use them, they shouldn't be in there.

  5. #5
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    You can't want to include every obscure widget that anyone, anywhere might have cause to use!

Posting Permissions

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