1. #1
    Sencha User
    Join Date
    Dec 2008
    Location
    Mainz
    Posts
    241
    Vote Rating
    1
    crp_spaeth is on a distinguished road

      0  

    Default [FIXED] store.load leads to a too much recursion in ext-all-debug.js (Linie 7528

    [FIXED] store.load leads to a too much recursion in ext-all-debug.js (Linie 7528


    Hi there,

    trying to get a direct store running under the Extjs 3.0-rc1.1 and under the current Headversion (3917) breaks with a too much recursion exception.

    I was able to break the error down to the following source.

    PHP Code:
    (
        function(){
            
    Ext.app.REMOTING_API = {
                
    url"any url",
                
    type:"remoting",
                
    "actions":
                {
                    
    "TestAction":
                        [
                            {
    "name":"doEcho","len":1},
                            {
    "name":"multiply","len":2},
                            {
    "name":"submit","formHandler"true,"len"1},
                            {
    "name":"getData","len"1},
                            {
    "name":"createData","len"1},
                            {
    "name":"deleteData","len"1},
                            {
    "name":"saveData","len"2}
                        ]
                 }
             };
         }
    )();

    Ext.Direct.addProvider(Ext.app.REMOTING_API); 

    var 
    reader = new Ext.data.JsonReader({
        
    totalProperty'total',
        
    successProperty'success',
        
    idProperty'id',
        
    root'data'
    }, [
        { 
    name'id' },
        { 
    name'email'allowBlankfalse },
        { 
    name'first'allowBlankfalse },
        { 
    name'last'allowBlankfalse }
    ]);
        var 
    writer = new Ext.data.JsonWriter({
            
    returnJsontrue,
            
    writeAllFieldsfalse
        
    });

        var 
    store = new Ext.data.DirectStore({                
            
    api: {
                
    loadTestAction.getData,
                
    createTestAction.createData,
                
    saveTestAction.saveData,
                
    destroyTestAction.deleteData
            
    },
            
    readerreader,
            
    writerwriter,     // <-- plug a DataWriter into the store just as you would a Reader
            
    paramsAsHashfalse,
            
    batchSavefalse,
            
    prettyUrlsfalse,
            
    listeners: {
                
    load: function(result) {            
                },
                
    loadexception: function() {

                },
                
    scopethis
            
    }
        });
    store.load(); 
    It seems to me that there is something wrong in the creating transaction routine.
    Since you can set a breakpoint in the queueTransaction methode you will see that the transaction the method gets called with, has a data propertie containing an array. the array then contains an object with a propertie called scope.
    Since scope is a self referencing object the encode routine will end up with a too much recursion exception.

  2. #2
    Sencha User
    Join Date
    Dec 2008
    Location
    Mainz
    Posts
    241
    Vote Rating
    1
    crp_spaeth is on a distinguished road

      0  

    Default


    btw. this problem doesn't appear in Ext3.0-rc-1.0

  3. #3
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,198
    Vote Rating
    120
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Thanks for the bug report. We'll look into it.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  4. #4
    Sencha User
    Join Date
    Dec 2008
    Location
    Mainz
    Posts
    241
    Vote Rating
    1
    crp_spaeth is on a distinguished road

      0  

    Default


    I didn't know where i should place this thread into... Ext.Direct or into Bugs... Maybe someone should move it into bugs...

  5. #5
    Ext User shibubh's Avatar
    Join Date
    Jul 2007
    Location
    Lamahi,Dang Nepal
    Posts
    449
    Vote Rating
    0
    shibubh is on a distinguished road

      0  

    Default


    change
    {"name":"getData","len": 1}, to {"name":"getData","len": 0},

    and it works
    Shibu Bhattarai

    Use JavaScript beautifier to beautify you code http://jsbeautifier.org/

    Code Conventions http://javascript.crockford.com/code.html

    ExtJS Core Manual http://extjs.com/products/extcore/manual/

  6. #6
    Sencha User
    Join Date
    Dec 2008
    Location
    Mainz
    Posts
    241
    Vote Rating
    1
    crp_spaeth is on a distinguished road

      0  

    Default


    Thank you shibubh!

    Seems to work with len set to 0 but I don't really get it...
    Since the store may calls the getData Function with a parameter sort for example this len propertie doesn't seem to fit...

    *** edit ***

    Okay i gave it a try and since len is 0 the data propertie posted to the Server is null even if i do a sort...
    Last edited by crp_spaeth; 10 May 2009 at 12:15 PM. Reason: tested remoteSort with len = 0

  7. #7
    Ext User shibubh's Avatar
    Join Date
    Jul 2007
    Location
    Lamahi,Dang Nepal
    Posts
    449
    Vote Rating
    0
    shibubh is on a distinguished road

      0  

    Default


    i think there is a problem on Extjs DirectStore class.
    Shibu Bhattarai

    Use JavaScript beautifier to beautify you code http://jsbeautifier.org/

    Code Conventions http://javascript.crockford.com/code.html

    ExtJS Core Manual http://extjs.com/products/extcore/manual/

  8. #8
    Ext User shibubh's Avatar
    Join Date
    Jul 2007
    Location
    Lamahi,Dang Nepal
    Posts
    449
    Vote Rating
    0
    shibubh is on a distinguished road

      0  

    Default


    and if you want to have a len =1 then
    reconfigure DirectStore and set paramsAsHash: true
    Shibu Bhattarai

    Use JavaScript beautifier to beautify you code http://jsbeautifier.org/

    Code Conventions http://javascript.crockford.com/code.html

    ExtJS Core Manual http://extjs.com/products/extcore/manual/

  9. #9
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,834
    Vote Rating
    609
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    This has been resolved in SVN. As the previous poster said, if you want to send params you need to use paramsAsHash or paramOrder.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 3

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