1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    65
    Vote Rating
    0
    thameema is on a distinguished road

      0  

    Red face [Solved]Store and XmlReader wierd caching issue

    [Solved]Store and XmlReader wierd caching issue


    I am using the Store and XmlReader to print some content to my template and I am facing a weird issue. Before I explain please go thru this code snippet.

    Code:
    var uplPrevStore = new Ext.data.Store({
    				proxy: new Ext.data.HttpProxy({
                		method:'post',
                		url:'/global/provider/nodec/serveContent.action'            		
                		}),
                	reader:prevXmlReader                                  
            	}); 		
    		uplPrevStore.load({
    				params:{outputType:'xml',env:'sandbox', contentId:record.data.sandboxContentId},
    				callback:function(rec,x,y){
    					recordData.content = rec[0].data.base64content;
    					recordData.mime  = rec[0].data.mime;
    				}			
    			});
    var uplPrevStore = new Ext.data.Store({
    				proxy: new Ext.data.HttpProxy({
                		method:'post',
                		url:'/getContent.action'            		
                		}),
                	reader:prevXmlReader                                  
            	}); 		
    		uplPrevStore.load({
    				params:{outputType:'xml',env:'dev', contentId:record.data.contentId},
    				callback:function(rec,x,y){
    					recordData.content = rec[0].data.base64content;
    					recordData.mime  = rec[0].data.mime;
    				}			
    			});
    CExplorer.getTemplate().overwrite(this.preview.body, recordData);
    In the callback function I am getting the records[] array and from the first record i need to get the content and mime and setting it to another recordData object. Later I am applying the "recordData" object to a template.

    The issue is, the values are not getting populated within callback function. But if i set breakpoint within the callback loop the content is getting populated and the code works without an issue. If I remove the breakpoint, its not getting populated. I am not sure whats special when I set the breakpoint...
    Another weird thing is, If I set the break point at "CExplorer.getTemplate()....." line, values are not getting populated from the record.

    I would appreciate your help.

    P.S: I posted 3-4 questions for the past 3 days regarding different issues but none of them got answered. I used to get faster replies from the community but i noticed that its not anymore.

    Jack, I hope you can listen to this question and possibly reply.

    Thanks,
    Tham.

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

      0  

    Default


    Your formatting is so bad that it's hard to read what is inside what.

    But I suspect that you are not taking into account that loading is asynchronous, and are calling overwrite before the data has arrived.

    And "var uplPrevStore" twice??????

  3. #3
    Ext User
    Join Date
    Mar 2007
    Posts
    65
    Vote Rating
    0
    thameema is on a distinguished road

      0  

    Default


    Hi animal,

    Thanks for your first reply. The uplPrevStore is copy paste mistake..somehow its pasted twice but actually its declared once... I got this thing working using DataView and I am facing another issue with it.. Can you please read the following forum and help me on that....

    http://extjs.com/forum/showthread.php?t=23547

Thread Participants: 1

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