GArrow
15 Aug 2011, 8:12 AM
In Ext 3.x I often needed to restrict the values displayed by one widget based on the value selected in another widget.
For example, imagine one ComboBox that selects a US state, and then a second one that offers the names of some cities in that state. When a state is selected, the city-selector should display only the appropriate values.
In 3.x, I addressed this by having an event handler for the state-selector set a base param in the city-selector to the state value and then trigger a load:
In 4.x it would be nice to be able to use associations and say:
cityComboBox.setStore(stateRecord.getCities());
But this obviously isn't possible.
How can/should this problem be approached in 4.x?
For example, imagine one ComboBox that selects a US state, and then a second one that offers the names of some cities in that state. When a state is selected, the city-selector should display only the appropriate values.
In 3.x, I addressed this by having an event handler for the state-selector set a base param in the city-selector to the state value and then trigger a load:
In 4.x it would be nice to be able to use associations and say:
cityComboBox.setStore(stateRecord.getCities());
But this obviously isn't possible.
How can/should this problem be approached in 4.x?