1. #11
    Sencha User
    Join Date
    Oct 2010
    Location
    India
    Posts
    84
    Vote Rating
    0
    Anup Rana is on a distinguished road

      0  

    Default


    How to load store dynamically on any event IN EXTJS ?

  2. #12
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    89
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    That depends on the server.

    I'm using a J2EE server with Spring, so I could tell you how to configure that one, but for other servers/languages you'll have to search yourself.

  3. #13
    Sencha User
    Join Date
    May 2013
    Posts
    4
    Vote Rating
    0
    srsi is on a distinguished road

      0  

    Default Similar problem

    Similar problem


    Hi Condor,

    I have similar problem. Can you please help me a little bit here.

    When I submit the form, I am getting an ext-all.js error when I see the IE developer toolbar console on IE8.

    Object doesn't support this property or method ext-all.js, line 11 character 123391.

    This line has g=this.getMethod(),d=g=="GET";if(e.clientValidation===false||this.form.isValid()).
    This ext version is 2.3, I tried using FileUploadField.js from both 2.3 and version 3.4 and has the same error on my console. Please help.

    Below is my code, as soon as I submit it stays on waitMsg forever and not even hitting my spring controller.
    items: [{
    xtype: 'fileuploadfield',
    id: 'form-file',
    width: 200,
    allowBlank: false,
    fieldLabel: 'Attachment',
    name: 'member'
    }],
    buttons: [{
    text: 'Save',
    scope: this,
    handler: function(btn, e){
    debugger;
    if(this.getForm().isValid()){

    this.getForm().submit({
    url: 'http://localhost:9090/myProject/xxx/memberUtilities/uploadFile',
    waitMsg: 'Uploading your file...',
    success: function(fp, o){
    debugger;
    Ext.Msg('Success', 'Processed file "'+o.result.file+'" on the server');
    },
    failure: function(){
    debugger;
    }
    });

    }
    }
    },{
    text: 'Reset',
    scope: this,
    handler: function(btn, e){
    debugger;
    this.getForm().reset();
    }
    }]

    My Spring controller test code is as follows.
    @RequestMapping(value="/uploadFile", method = RequestMethod.POST)
    public @ResponseBody String uploadFile(FileUploadBean uploadItem, BindingResult result)
    {

    if(uploadItem.getFile() != null)
    {
    String fileName = uploadItem.getFile().getOriginalFilename();
    byte[] file = uploadItem.getFile().getBytes();
    }

    return "{\"success\":false,\"fileName\":\"dummy.png\"}";
    }

    FileUploadBean.java as follows:

    public class FileUploadBean {

    private CommonsMultipartFile file;

    public CommonsMultipartFile getFile() {
    return file;
    }

    public void setFile(CommonsMultipartFile file) {
    this.file = file;
    }
    }

    I have configured following in my spring config file.
    <!-- Configure the multipart resolver -->
    <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
    <!-- one of the properties available; the maximum file size in bytes -->
    <property name="maxUploadSize" value="100000"/>
    </bean>

    It is really urgent to me, please help.

    Thanks,
    Siddu

  4. #14
    Sencha User
    Join Date
    Jun 2013
    Posts
    8
    Vote Rating
    0
    guilan is on a distinguished road

      0  

    Default


    I am encountering the similar problem. The error is 'getForm is undefined' here is my code:

    Code:
    this.rootPanel = new Ext.form.FormPanel({
                bodyStyle: "padding: 10px;",
    	    title : this.data.data.desc,
                autoScroll: true,
    	    fileUpload: true,
                labelWidth: 80,
                items: [
    			{
                       		xtype: 'fileuploadfield',
                        		id: 'photo',
                        		emptyText: 'Select a document to upload...',
                        		fieldLabel: 'Photo upload',
    				buttonAlign:'left',
                        		buttonText: 'Browse'
                    	}],
    	   buttons: [{
                        		text: 'Upload',
                        		handler: function(){
                                        if(this.rootPanel.getForm().isValid()){
                                	        form_action=1;
                               		this.rootPanel.getForm().submit({
                                    	     url: 'upload.php',
                                    	     waitMsg: 'Uploading file...',
                                    	     success: function(form,action){
                                        	         msg('Success', 'Processed file on the server');
                                                 }
                                	        });
                                        }
                        	     }
                    }]
           });
    Can anybody help me? Thank you in advance.

  5. #15
    Sencha User
    Join Date
    Jan 2011
    Posts
    544
    Vote Rating
    52
    willigogs is a jewel in the rough willigogs is a jewel in the rough willigogs is a jewel in the rough

      0  

    Default


    I would imagine using this.rootpanel to reference your form will fail, since the scope of 'this' will change dependent on where you are in the code.

    Grab your form via another method, and then check that you are indeed referencing the form (console.log) before running functions against it.

Similar Threads

  1. change uploadfile button
    By albaba1903 in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 20 Jan 2010, 8:15 PM
  2. A simple Form with uploadFile field inside!?
    By Dariusz in forum Ext 2.x: Help & Discussion
    Replies: 17
    Last Post: 16 Nov 2007, 4:57 AM

Thread Participants: 4

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