We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27519
    • 275 Posts
    I’ll have to leave this to the more knowledgeable folk here....

    I have a JSONStore configured like so:

    		var dstore = new Ext.data.JsonStore({
    			url: Tariffs.config.connector_url
    			,params: {
    				action: 'mgr/calendar/getmonth'
    				,cottage: Ext.getCmp('cottages').getValue()
    			}
    			,fields: ['year', 'month', 'html']
    			,root: 'months'
    			,autoDestroy: true
    		});
    


    The problem is that the getmonth.php is not executed, probably due to some issue with the way the url is formed.

    The url attribute - Tariffs.config.connector_url - (checked with JS debugger in Chrome) holds:
    /modx/assets/components/tariffs/connector.php
    


    This is good, as this is my connector which dispatches to my processors.

    Using the params option I expect to get to getmonth.php.

    However this doesn’t work as getmonth.php is not executed, although the connector.php is executed.

    How do I modify this JSONStore definition so it’s properly configured to pass the correct action url? I think I tried about everything...

    As always... help is very much appreciated!
      MODx Revolution / MAMP / OS X
      • 28215
      • 4,149 Posts
      params: doesn’t work in JsonStore; you’ll need to use baseParams: instead.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 27519
        • 275 Posts
        Quote from: splittingred at Oct 14, 2010, 10:54 AM

        params: doesn’t work in JsonStore; you’ll need to use baseParams: instead.

        That was it. Thanks!

        I now see that the processor is run and I see the JSON encoded data appear in the log.

        However, if I do dstore.load() and dstore.getTotalCount(), the count is 0....
          MODx Revolution / MAMP / OS X