Results 1 to 3 of 3

Thread: Repeated to open web page after pollProvider

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    14
    Answers
    1

    Default Answered: Repeated to open web page after pollProvider

    Hello sencha:
    I has a problem here. In normal, if i execute function1 and browser will open the web page "test1.html" once. But if i add a poll provider like execute function2, and then execute function1 after function2 finish, browser will open the web page "test1.html" twice. If i execute function2 tree time then execute function1, the browser will open the web page tree time. Why happen this? is there has some parameter i am not setting? or i didn't close the provider correct? please help me, i am so confused here, thanks.

    Code:
    #Function1:
        window.open('../web/test1.html');
    
    #Function2:
            Ext.direct.Manager.addProvider({
                type:'polling',
                url: '../Svr.php',
                interval: 3000,
                id: "provider1",
                baseParams:{ 'func':'homeMgr', 'op':'getProcessStatus', 'proId': 'provider1'  },
                listeners: {
                    data: function(provider, event){
                        var proResult = event.proResult;
                        if( proResult == "finish" ){
                            Ext.direct.Manager.getProvider( proId ).disconnect();
                            Ext.direct.Manager.removeProvider( proId );
                            Ext.getCmp(pbWinvId).close();
                        }
                    }
                }
            });

  2. I just know why happen this problem, because i execute init() before add provider, like this:
    Code:
    var homeCol = me.getController('home.HomeCol');
    homeCol.init();
    So every time i execute it, browser will open web page more once.
    But why? i was read the document, but i still don't know why?

  3. #2
    Sencha User
    Join Date
    Feb 2012
    Posts
    14
    Answers
    1

    Default

    I still can't solve this problem now. Does any one can help me, i will so thank.

  4. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    14
    Answers
    1

    Default

    I just know why happen this problem, because i execute init() before add provider, like this:
    Code:
    var homeCol = me.getController('home.HomeCol');
    homeCol.init();
    So every time i execute it, browser will open web page more once.
    But why? i was read the document, but i still don't know why?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •