Threaded View

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    52
    Answers
    2
    Vote Rating
    1
    testvogel is on a distinguished road

      0  

    Default Answered: Ajax.request callback, no reference to controller

    Answered: Ajax.request callback, no reference to controller


    Hi,

    I'm doing a Ajax request in my controller and have defined a callback method which should be called after the request:

    Code:
    			Ext.Ajax.request({
    				url: 'http://192.168.137.1:8080/example/',
    				method:'POST', 
    				headers: {
    					'Content-Type': 'application/json'
    				}, 
    				callback: this.ajaxResponse,
    				params: Ext.JSON.encode(form.getValues())
    			})
    ajaxResponse will be called, but after this ajax request I want to change the view and dont have a reference to this controller with 'this'. This means that

    Code:
     this.addRef(....)
    is not working, because addRef is unknown.
    Any ideas why I have loose the controller reference?

  2. Code:
    Ext.Ajax.request({
    				url: 'http://192.168.137.1:8080/example/',
    				method:'POST', 
    				headers: {
    					'Content-Type': 'application/json'
    				}, 
                                    scope : this,
    				callback: this.ajaxResponse,
    				params: Ext.JSON.encode(form.getValues())
    			})

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