1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    17
    Vote Rating
    0
    Sam007 is on a distinguished road

      0  

    Default Unanswered: Unable to Upload CSV File using GeoExt Action

    Unanswered: Unable to Upload CSV File using GeoExt Action


    Hi,


    I am trying to create a CSV File upload on GeoExt Map App.


    I need to place the upload function within the Ext.Action, so that I can add it to the toolbar of the GeoExt Panel. I am trying to implement this example. Here is my code,


    Code:
        action = new Ext.Action({
                text: "Upload Excel",
                control: new Ext.create('Ext.form.Panel', {
                        title: 'Upload a CSV File',
                        width: 400,
                        bodyPadding: 10,
                        frame: true,
                        renderTo: Ext.getBody(),
                        items: [{
                            xtype: 'filefield',
                            name: 'csv',
                            fieldLabel: 'CSV Upload',
                            labelWidth: 50,
                            msgTarget: 'side',
                            allowBlank: false,
                            buttonText: 'Select CSV File'
                        }],
    
                        buttons: [{
                            text: 'Upload',
                            handler    : function() {
                                var form = this.up('form').getForm();
                                if(form.isValid()){
                                    form.submit({
                                        url: 'file-upload.py',
                                        waitMsg: 'Uploading the CSV File...',
                                        success: function(fp, o) {
                                            Ext.Msg.alert('Success', 'Your csv file "' + o.result.file + '" has been uploaded.');
                                        }    
                                    });    
                                }    
                            }
                        }]
                }),    
                map: map,
                // button options
                tooltip: "Upload CSV File",
                // check item options
                group: "newTool"
            });
            actions["upCSV"] = action;
            toolbarItems.push(action);


    Firebug keeps giving me this error,


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


    Am I declaring the function incorrectly within the Ext.Action?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,791
    Answers
    3465
    Vote Rating
    833
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Did you require all the classes being used here?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    17
    Vote Rating
    0
    Sam007 is on a distinguished road

      0  

    Default


    Only need to add CSV Upload function and a button that opens a browse window. This buton needs to be added to the toolbar. That's it.

  4. #4
    Sencha User
    Join Date
    Sep 2012
    Posts
    17
    Vote Rating
    0
    Sam007 is on a distinguished road

      0  

    Default


    Any update on this question?

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi