1. #1
    Sencha User fangzhouxing's Avatar
    Join Date
    Mar 2007
    Posts
    466
    Vote Rating
    1
    fangzhouxing is on a distinguished road

      0  

    Default Dynamically Changing url of Data Store

    Dynamically Changing url of Data Store


    When used with RESTful Web Service, I always use uri like this:
    '/users/1/comments'. When the user selected changes, the uri is also changed like '/users/2/comments'.

    But in current version of ExtJS, the url of data store is configed in creation time. When I want to refresh the data, the url cannot be changed!

    I have two choice now:
    1)use param to send the user id value, but it is not the RESTful way!
    2)use Ext.Ajax.request and convert the data into arrray, then use ArrayReader in data store.

    If we can dynamically changing url of data store, all thing become very simple.

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,187
    Vote Rating
    119
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Although there is no setter method for the url there should not be a problem changing it at runtime.

    Try something like:
    Code:
    myDs.proxy.url = '/users/2/comments';
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User fangzhouxing's Avatar
    Join Date
    Mar 2007
    Posts
    466
    Vote Rating
    1
    fangzhouxing is on a distinguished road

      0  

    Default


    Following the tip provided by @aconran, I use following code successfully:

    Code:
    myDs.proxy.conn.url = '/users/2/comments'

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