View Full Version : How to get params to ScriptTagProxy used by ListStore

19 Oct 2009, 2:42 PM
I am using a ScriptTagProxy to get data for a ListStore that is used by a ComboBox. I want to pass some extra parameters to the URL accessed by ScriptTagProxy to limit the results. I think I should be using a LoadConfig to do this. However, I cannot make it work.

Here is my code:

ScriptTagProxy<ModelData> proxy = new ScriptTagProxy<ModelData> (url);

ModelType cityDef = new ModelType ();
cityDef.setRoot ("data");
cityDef.addField (new DataField ("name", "cN"));
cityDef.addField (new DataField ("id", "cId"));

JsonReader<OptionDataDef> reader = new JsonReader<OptionDataDef> (cityDef);

BaseListLoader<ListLoadResult<OptionDataDef>> bll = new BaseListLoader<ListLoadResult<OptionDataDef>> (proxy, reader);
BaseListLoadConfig bllc = new BaseListLoadConfig ();
bllc.set("param1", "paramvalue1");
bllc.set("param2", "paramvalue2");

ListStore<OptionDataDef> cityStore = new ListStore<OptionDataDef> (bll);
However, when ComboBox.doQuery() is called, it generates a new LoadConfig that ends up being passed to the ScriptTagProxy. How do I ensure that the LoadConfig I set is used?