1. #1
    Ext User
    Join Date
    Jun 2009
    Posts
    12
    Vote Rating
    0
    macistina is on a distinguished road

      0  

    Default Problem with refresh

    Problem with refresh


    Hi all,
    today I have a new problem!!!
    I have a tabPanel. My "tab item" is composed by 3 panel in north, center and south regions.
    I applied my panels by add method and doLayout at the and.
    Every panel have a coponent. North panel contain a form and it is ok.
    The center region contain a grid which is contains data from an ajax call.
    I want to refresh the grid every 10 seconds, but my refresh append new grids to the panel.
    The code below is to perform the ajax call:

    callDataProcess:function(){
    Ext.Ajax.request({
    //url: 'cdctPackageProcessData.action',
    url: 'gridProcess.jsp',
    success: packagePage.createGridProcess,
    failure: packagePage.failure
    });
    },
    createGridProcess:function(response){
    var json = Ext.decode(response.responseText);
    var processPanel = packagePage.panelInfoTraffic.getUpdater();
    processPanel.startAutoRefresh(10, packagePage.callDataProcess,true);
    gridBuilder.createGrid(packagePage.panelInfoTraffic, packagePage.idPackage, json);
    },
    ...
    gridBuilder.createGrid is the function to create the grid and it work well.

    I have the same problem for south panel in which I want perform every 10 second an ajax call but in this case the refresh must be append the result.
    This is the code After the ajax call:

    createMessagePanel:function(response){
    var json = Ext.decode(response.responseText);
    var str = "";
    for(var j=0;j<json.length;j++){
    str += "\n # "+json[j].data + "# " + json[j].processName +"# " + json[j].message;
    }
    var upPanel = packagePage.panelMessageTraffic.body.getUpdater();
    upPanel.startAutoRefresh(5, packagePage.callMessagePackage,true);
    packagePage.panelMessageTraffic.body.dom.innerHTML=str
    },
    ...
    Please help me.
    Thanks in advance

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Do not create a grid every 10 seconds.

    Create the grid once and reload the store every 10 seconds.

  3. #3
    Ext User
    Join Date
    Jun 2009
    Posts
    12
    Vote Rating
    0
    macistina is on a distinguished road

      0  

    Default


    Thank you Condor, now I try to refresh only datastore.
    About the second question, do you something to suggest me?
    Bye

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Second question:
    Do you want to keep using the updater? In that case you need to assign a different renderer that appends the text instead of replacing it.

  5. #5
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    2
    tryanDLS is on a distinguished road

      0  

    Default


    Please stop double posting - duplicate thread removed.

Thread Participants: 2

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