Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    18
    Answers
    2
    Vote Rating
    1
    neoraptor is on a distinguished road

      0  

    Default Answered: Problem with Ext.ux.Fileup

    Answered: Problem with Ext.ux.Fileup


    Hello,

    I have actually a problem with the extension Ext.ux.Fileup.

    I want to send a picture and use the callback to send a form, with some fields plus the imageUrl from the callback.

    The method is called when the image is upload and the response url is correct. However, I can't access to the getPatientForm() auto-generated method (patientForm is in refs section).
    I got the following error :
    Code:
    Uncaught TypeError: Object [object Object] has no method 'getPatientForm'
    Please note that if I use the autoupload feature and then submit the form, everything is ok. However, I can't avoid user to upload images without sending the form in this case
    That's why I want to send the image when I submit the form.

    Here is my controller code so far :
    Code:
       savePatient: function(options) {
          var fileBtn = Ext.getCmp('fileBtn');
          
          fileBtn.submit();
       },
    
    // Upload button initialisation
       onFileBtnInit: function(fileBtn) {
          var me = this;
          fileBtn.setCallbacks({
             scope: this.getPatientForm(),
             success: me.onFileUploadSuccess,
             failure: me.onFileUploadFailure
          });
       },
    
     onFileUploadSuccess: function(response) {
          console.log('Success');
          Ext.getCmp('imageUrl')
             .setValue(response.url);
             console.log(this)
             var patientForm = this.getPatientForm();
             var newValues = patientForm.getValues();
             var store = Ext.StoreManager.lookup('patientStore');
             var test = Ext.ModelMgr.create(newValues, 'iWound.model.patientModel');
             var errors = test.validate();
    
    
             if (!errors.isValid()) {
                Ext.Msg.alert('Error', 'Fail to save patient ' + newValues.name + '<br/><i>' + errors.items[0]._field + " " + errors.items[0]._message + '</i>', Ext.emptyFn);
             } else {
                store.add(test);
                store.sync();
                Ext.Msg.alert('User added', 'User ' + newValues.name + ' was added successfully', Ext.emptyFn);
             }
    }
    How could I retrieve the patientForm method?

  2. Problem solved : you can retrieve the context with this._callbacks.scope

  3. #2
    Sencha User
    Join Date
    Jun 2012
    Posts
    18
    Answers
    2
    Vote Rating
    1
    neoraptor is on a distinguished road

      0  

    Default


    Problem solved : you can retrieve the context with this._callbacks.scope

  4. #3
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    3
    Vote Rating
    0
    shenglinxu is on a distinguished road

      0  

    Default Ext.ux.Fileup issue

    Ext.ux.Fileup issue


    I have tested with Ext.ux.Fileup:

    {
    id: 'fileBtn',
    xtype: 'fileupload',
    autoUpload: false,
    url: '/src/php/getfile.php'
    },


    It works fine when I run it in chrome from my desktop.
    However, the Browse images does not work on IPad.

Thread Participants: 1

Tags for this Thread