Reputation: 3456
I have 2 filtering selects. The first one is populated with static data, the second one should be populated according to first select's selected value, i.e. the ajax request should be sent to server. Here is the approximate code in first select's onChange event:
var secondSelectFilterStore = dijit.byId("second_select").store;
secondSelectFilterStore.url = 'some/url?id=' + dijit.byId("first_select").get("value");
// what now? maybe this?
secondSelectFilterStore.fetch();
// doesn't help
// or maybe something like this?
dijit.byId("second_select").setValue(some_arbitrary_value);
I've tried some more, but still no luck. This task is really very typical, I'm sure that solution should be very simple. But I just can't figure it out, actually I'm new to dojo and it seems pretty scary for me yet ;)
Upvotes: 0
Views: 164
Reputation: 3456
Great answer can be found here.
ItemFileReadStore fetches data and first item is set in second select as default.
Upvotes: 0