1. #1
    Ext User
    Join Date
    Mar 2008
    Posts
    57
    Vote Rating
    0
    brenda is on a distinguished road

      0  

    Question My window just keep loading, loading, loading

    My window just keep loading, loading, loading


    Need some help from you guys out there.
    I've made a nice event calendar (thanks cmendez21 ) and decided to let the window perform a autoRefresh for every x sec.

    However, when my window starts to refresh on its own, it seems to run into a while loop and keep loading, loading, loading... Like this:

    (it is still loading while I am typing this thread)

    I really have no idea what's wrong

    Here's my code:
    PHP Code:
    var eventCalendarReader = new Ext.data.JsonReader(
             {
                 
    root'eventCalendars.data',                
                  
    id'id',                             
                  
    successProperty'eventCalendars.success',     
                  
    totalProperty'eventCalendars.totalRows'    
              
    },
            [
                {
    name:'recid',          mapping:'id',             type'string'},
                {
    name:'subject',      mapping:'subject',     type'string'},
                {
    name:'description'mapping:'eventDescription'type'string'},
                {
    name:'startdate',      mapping:'eventStartDate',     type'string'},
                {
    name:'enddate',      mapping:'eventEndDate',     type'string'},                
                {
    name:'color',          mapping:'color',         type'string'},
                {
    name:'parent',         mapping:'parent',        type'int'}, 
                {
    name:'priority',     mapping:'priority',    type'int'}
            ]
        );
        
        
    // Create an http proxy 
        
    var httpProxy = new Ext.data.HttpProxy({url'listAllEventCalendar.action'});
        
        
    // Datastore for event calendar
        
    var eventCalendarDataStore = new Ext.data.Store({
            
    proxyhttpProxy,
            
    readereventCalendarReader
        
    });

         function 
    loadAndShowEventCalendar(recordArrayoptionssuccess) {
            
    prueba = new Ext.ECalendar({
                
    // codes to create my calendar
            
    });
        
        
    win = new Ext.Window({  
            
    // codes to add my calendar into a window
        
    });
        
    win.on('render',function(){
            
    win.getUpdater().startAutoRefresh(15, function(){
                
    eventCalendarDataStore.reload();
            });
            
    prueba.refreshCalendarView();
        });
        
    win.show();    
        
        
    // trigger the data store load
        
    eventCalendarDataStore.load({params:{start:0limit:10}});
            
         } 
    Hope that someone can point out my mistakes. Thanks

  2. #2
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    79
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    I'm very confused as to what you're trying to do. The updater will fetch HTML from some remote location and display it in the container's body.

    That said, you'r eusing a datastore. is Ext.ECalendar a descendant of Ext.DataView?

    This is really strange.

  3. #3
    Ext User
    Join Date
    Mar 2008
    Posts
    57
    Vote Rating
    0
    brenda is on a distinguished road

      0  

    Default


    Quote Originally Posted by jgarcia@tdg-i.com View Post
    I'm very confused as to what you're trying to do. The updater will fetch HTML from some remote location and display it in the container's body.

    That said, you'r eusing a datastore. is Ext.ECalendar a descendant of Ext.DataView?

    This is really strange.
    Hmm, in order for the Ext.ECalendar to display events, I'll need to save the data somewhere, right?

    I'll need to check if Ext.ECalendar is a descendant of a Ext.DataView.. I just know that Ext.ECalendar extend from Ext.Panel

  4. #4
    Sencha Premium Member cmendez21's Avatar
    Join Date
    Jun 2007
    Location
    Mexico D.F.
    Posts
    478
    Vote Rating
    0
    cmendez21 is on a distinguished road

      0  

    Default


    jeez what you're trying to do
    The calendar does extends the panel but not the dataview (the calendar code controls all the rendering for each view) now one of the things its:

    1.- Why you need to refresh every X seconds , let the user refreshes the calendar by the (Gear) toolbar.

    2.- The calendar delays a while while rendering all the view plus the events in some cases its kinda slow and for some users its fast, and also not so fast to refresh every x seconds while you are refreshing the calendar doesn't even finish the first render so you may enter in a big loop

    Maybe you could refresh every N Minutes instead but the memory its going to increase huge (in firefox and chrome are the faster to render the calendar) even you have to calculate the time aprox from the speed of the proxy you are requesting

    Instead better set a timer to N minutes to reload the store you don't need to refresh the window I don't think the events are created every n second or do they ?

    I dont see a good reason to refresh every n second..!

    If it was a chat i grant it but need more explanation of what you're trying to do so i could give you perhaps an alternative
    E2CS: Extjs - Event calendar solution | XtPrinter
    Calendar Thread | XtPrinter Thread| Blog

  5. #5
    Ext User
    Join Date
    Mar 2008
    Posts
    57
    Vote Rating
    0
    brenda is on a distinguished road

      0  

    Default


    Quote Originally Posted by cmendez21 View Post
    jeez what you're trying to do
    The calendar does extends the panel but not the dataview (the calendar code controls all the rendering for each view) now one of the things its:

    1.- Why you need to refresh every X seconds , let the user refreshes the calendar by the (Gear) toolbar.

    2.- The calendar delays a while while rendering all the view plus the events in some cases its kinda slow and for some users its fast, and also not so fast to refresh every x seconds while you are refreshing the calendar doesn't even finish the first render so you may enter in a big loop

    Maybe you could refresh every N Minutes instead but the memory its going to increase huge (in firefox and chrome are the faster to render the calendar) even you have to calculate the time aprox from the speed of the proxy you are requesting

    Instead better set a timer to N minutes to reload the store you don't need to refresh the window I don't think the events are created every n second or do they ?

    I dont see a good reason to refresh every n second..!

    If it was a chat i grant it but need more explanation of what you're trying to do so i could give you perhaps an alternative

    Oh well, it's a request from my client.. What they hope to see is that when a user is updating the calendar the other user who is viewing the same calendar gets to see the new event automically (without refreshing the calendar)

    Anyway, it is just a try-out and if it is not possible, I'll get back to my client.

    btw, I don't intend to refresh it @ 5sec... What I want is to refresh it like every 5min. (The 5sec is for me to test if the updater is working with the function)

    I'll set the refresh rate to 5min then

  6. #6
    Sencha Premium Member cmendez21's Avatar
    Join Date
    Jun 2007
    Location
    Mexico D.F.
    Posts
    478
    Vote Rating
    0
    cmendez21 is on a distinguished road

      0  

    Default


    Its possible to achieve this as you told , but if youre gonna test it on seconds to see if works include some "console" logs instead of the calendar and for the every 5 minutes include the calendar and test every 5 minutes , i know it could be kind boring to be waiting every 5 minutes but its worth it

    for my developments i first test as separate parts and then when i see every part works fine i put it all together and test
    E2CS: Extjs - Event calendar solution | XtPrinter
    Calendar Thread | XtPrinter Thread| Blog

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