1. #1
    Sencha User chesstrix's Avatar
    Join Date
    Apr 2008
    Posts
    117
    Vote Rating
    1
    chesstrix is on a distinguished road

      0  

    Default [Solved] Ext.data.Store mystery

    [Solved] Ext.data.Store mystery


    Hi All, I have looked everywhere but cannot find anything that helps with an issue I have with a Store. It works fine in FF but returns the emptyText msg in IE. I dont think I have any extra commas in any config anywhere and with the crap debug facilities in IE I do not know where to turn next. Could someone please try and help?

    My Store is
    PHP Code:
    var topPuzzlesStore = new Ext.data.Store({
            
    reader: new Ext.data.XmlReader({
                  
    totalRecords'totalCount',            
                  
    record'aTopPuzzle',  
                  
    id'id' 
                  
    }, ["id""loggedOn""title""rating""times_played""composer"]
            ),
            
    url"ct_home.fetch_top_puzzles",
            
    baseParams: {
                
    pCacheDump: new Date().getTime()
            },
            
    remoteSorttrue,
            
    storeId"topPuzzlesStore",
            
    listeners: {
                
    'load': function(){ 
                    
    cTrix.App.TopPuzzles.resize();
                }
            }
      }); 
    My panel is
    PHP Code:
        this.win = new cTrix.App.absPanel({
            
    title'Top Puzzles',
            
    contentEl'TopPuzzlesWrap',
            
    id'TopPuzzles',
            
    cTrixPage'RHS',
            
    xconfig.x,
            
    yconfig.y,
            
    heightthis.h,
            
    widththis.w,
            
    collapsiblefalse,
                
    layout'absolute',
                 
    items: [{
                    
    xtype'dataview',
                
    storetopPuzzlesStore,
                    
    tpltopPuzzlesTpl,
                    
    x1,
                    
    y1,
                
    overClass:'x-view-over',
                    
    itemSelector'div.tpwrap',
                
    deferEmptyTexttrue,
                    
    emptyText'<div style="margin-top: 50px; margin-left: 50px; font-size: 120%;">No Top Puzzles??</div>',
                
    loadingText'Loading Top Puzzles...',
                
    singleSelecttrue,
                
    cls"dataView"
             
    }]
        }); 
    The return from the ajax load is
    PHP Code:
    <?xml version="1.0" encoding="UTF-8"?><toppuzzles><aTopPuzzle><id>PU14DOPW5I</id><loggedOn></loggedOn><title><![CDATA[Mate in 2 by AHUES Herbert Siegfried Oskar (Schach 03/1999)]]></title><rating>4</rating><times_played><![CDATA[     200]]></times_played><composer><![CDATA[ChessTrix]]></composer></aTopPuzzle></toppuzzles>

  2. #2

  3. #3
    Sencha User chesstrix's Avatar
    Join Date
    Apr 2008
    Posts
    117
    Vote Rating
    1
    chesstrix is on a distinguished road

      0  

    Default


    OK, hoping for some help from an Ext Support team member here.

    I am tracing this issue and am on line 262 of Connection.js (Ext 2.0.2)

    HTML Code:
                this.transId = Ext.lib.Ajax.request(method, url, cb, p, o);
    But I cannot, for the life of me, find the code for Ext.lib.Ajax.request()

    Could someone please tell me where to look.

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    It's in the adapter. You shouldn't have stepped that far in.

    In the HttpProxy, just set a break in the callback function (loadResponse) to catch execution on the return of the request, and click "go".

  5. #5
    Sencha User chesstrix's Avatar
    Join Date
    Apr 2008
    Posts
    117
    Vote Rating
    1
    chesstrix is on a distinguished road

      0  

    Default


    Thank Animal,

    I looked in there but by the time the callback loadResponse is called o.totalRecords has been set to zero by something (or not set at all). I think I need to go deeper.

    Remember it works fine in FF.

    I'll try the debugger again, but its in IE that it goes awry.

  6. #6
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    No.

    loadResponse is where the RAW DATA arrives back.

    read it!

    It takes the raw data, and uses the reader to attempt to read Records from it. That's the code you have to step through.

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Use IE8 to debug your stuff on IE.

  8. #8
    Sencha User chesstrix's Avatar
    Join Date
    Apr 2008
    Posts
    117
    Vote Rating
    1
    chesstrix is on a distinguished road

      0  

    Default


    Sorry, I was thinking about Store.loadRecords (doh!) I've been at this a while now!!!

    I'll trace in loadResponse and see if I get somewhere.

    Ta.

  9. #9
    Sencha User chesstrix's Avatar
    Join Date
    Apr 2008
    Posts
    117
    Vote Rating
    1
    chesstrix is on a distinguished road

      0  

    Default


    Okay, I've done a bit more hunting and now I'm really confused.
    I drilled right down into DomQuery.getNodes only to find ns was an empty object.
    Working back up...

    When the following code from HttpProxy is executed:
    PHP Code:
        loadResponse : function(osuccessresponse){
            
    alert(response.responseXML.constructor);
            ...
        }, 
    FF returns [object XMLDocument]
    IE returns undefined

    Does this make sense to anybody else?

  10. #10
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Looks like an XML parsing error.

    Was the Content-Type set as required in the API docs?

    http://extjs.com/deploy/dev/docs/?cl...data.XmlReader

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar