Results 1 to 3 of 3

Thread: Changing store URL and reloading issue

  1. #1
    Ext JS Premium Member
    Join Date
    Dec 2010
    Posts
    12

    Default Changing store URL and reloading issue

    Hello,

    I am trying to change the store URL depending on user interaction. The url in store changes correctly but the data in store is not reloaded though I call load. Do I need to do something else or is this a bug?

    The reader below is a JSON reader.
    Code:
    return new Ext.data.GroupingStore({
                reader: reader,
                url : properties.Url,
                autoLoad : true,
                groupField : 'gName',
    	  });
    Here is the code to change URL:
    Code:
    var propGrid = Ext.getCmp("prop_grid");
    	if(propGrid)
    	{
    		var propstore = propGrid.getStore();
    		if(!propstore)
    			return;
    		
    		propstore.url = properties.newUrl;  //URL changes correctly
    		propstore.load(); //This should work????
                    //popstore.reload(); //Tried this too...
    				
    		/*Ext.TaskMgr.start({
    		  run: propstore.reload,
    		  scope: propstore,
    		});*/ //Tried this too....
    	}
    Thanks,
    Karthik

  2. #2
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,751

    Default

    according to the api docs:

    url : String
    If a proxy is not specified the url will be used to implicitly configure a HttpProxy if an url is specified. Typically this option, or the data option will be specified.
    url is a config, not a public property.

    if you address the HttpProxy, you have a public method setUrl.


    best regards
    tobiu
    Best regards
    Tobias Uhlig

  3. #3
    Ext JS Premium Member
    Join Date
    Dec 2010
    Posts
    12

    Default

    Thanks for the information. It would have been very convenient if url was a public property.

Similar Threads

  1. Changing URL of a store at runtime
    By RollingFred in forum Ext Designer: Help & Discussion
    Replies: 5
    Last Post: 16 Dec 2010, 9:21 AM
  2. gridpanel store remote url issue
    By evr in forum Ext 2.x: Help & Discussion
    Replies: 9
    Last Post: 8 Oct 2009, 1:43 AM
  3. Dynamically Changing url of Data Store
    By fangzhouxing in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 17 Jul 2008, 10:49 PM
  4. data.Store reloading issue
    By Janachi in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 17 Jun 2008, 2:21 AM
  5. reloading store, hiding window scope issue
    By [email protected] in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 3 Jun 2008, 7:12 PM

Tags for this Thread

Posting Permissions

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