Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-924 in a recent build.
  1. #1
    Touch Premium Member
    Join Date
    Dec 2008
    Location
    Utrecht, The Netherlands
    Posts
    37
    Vote Rating
    0
    dlouwers is on a distinguished road

      0  

    Default Callback not called when submitting form

    Callback not called when submitting form


    Hi,

    When the AJAX request for submitting an Ext.form.Panel is successful (a HTTP header 200 OK is returned) but the responseText does not contain the JSON element { success: true }, no callback is called. In Sencha Touch 1 the failure callback is called in this case.
    One could argue that this case should never occur because according to REST a header in the 400 range should be returned, but I think that many webservices do not support this and do return a 200 header. I therefore suggest that the behaviour from version 1 is restored.

    Here are the relevant code snippets from Sencha Touch 2 (Ext.form.Panel):

    Code:
    if (success) {
        response = Ext.decode(responseText);
        success = !!response.success;
        if (success) {
            if (Ext.isFunction(options.success)) {
                options.success.call(options.scope || me, me, response, responseText);
            }
            me.fireEvent('submit', me, response);
        }
    }
    else {
        if (Ext.isFunction(options.failure)) {
            options.failure.call(options.scope || me, me, response, responseText);
        }
        me.fireEvent('exception', me, response);
    }
    ... and Sencha Touch 1 (Ext.form.FormPanel):

    Code:
    if (success) {
    
        response = Ext.decode(responseText);
        success = !!response.success;
    
        if (success) {
            if (Ext.isFunction(options.success)) {
                options.success.call(options.scope || this, this, response, responseText);
            }
    
            this.fireEvent('submit', this, response);
            return;
        }
    }
    
    if (Ext.isFunction(options.failure)) {
        options.failure.call(options.scope || this, this, response, responseText);
    }
                        
    this.fireEvent('exception', this, response);

  2. #2
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Sounds like a bug, thank you for the report.

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