Results 1 to 2 of 2

Thread: change ajax proxy url dynamically

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    6
    Vote Rating
    0
      0  

    Default change ajax proxy url dynamically

    Hello, plz how can i change the url of an ajax proxy after a buttton click and refresh the list data. Thx

  2. #2
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Location
    Italy
    Posts
    1,395
    Vote Rating
    24
      0  

    Default

    You first have to get the list store, so if you know its name:

    Code:
    var store = Ext.getStore('NAME');
    otherwise if you have the list component instance:

    Code:
    var store = list.getStore();
    Then you have to get the proxy and change its url:

    Code:
    store.getProxy().setUrl('NEW_URL');
    Finally reload the store:

    Code:
    store.load();
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    Owner at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    https://github.com/AndreaCammarata/TUX


Posting Permissions

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