ZF-7266: Dijit parsing before store creation fails value setting in FilteringSelect and ComboBox.

Description

In 1.8.4, doing something like this in a view:

echo $this->filteringSelect( 'select', '20', array( 'store' => 'store', 'storeType' => 'dojo.data.ItemFileReadStore', 'storeParams' => array('url' => '/my/data')) );

Fails, the 'value' is not set because the store is not loaded when it it parses the input. With a filteringSelect the input remains a textbox with the value set, but it is not a dojo object, and everything else on the page breaks. With a comboBox the value and label are set to the identifier value that I am passing instead of the label getting set properly (assuming because combo box allows things not in the store). I tried putting a 'value' option in the params array, but that doesn't seem to propagate, and even if I test this by hand it still doesn't load properly because of the way things are getting parsed.

Anyone have any idea's? Besides creating all this stuff by hand?

Comments

Confirmed.

The following scenarios work: * Declarative usage ** If the store is already defined prior to parsing, and the widget references the jsId of the store, then the value will be set. ** If the store is already defined prior to parsing, but the widget does not define the store and the store is manually added to the widget following parsing, the value will not be set. ** If the store is already defined prior to parsing, but has no jsId, there's no way whatsoever to associate it with the widget; the value will not be set. * Programmatic usage ** The store must be set and added as part of the widget declaration for the value to be set (i.e., added as an object, not as a string referencing the jsId) ** Any other situation will result in no value being set

Thus, the only way for this to work is for the store declaration to happen prior to onLoad, and for the store declaration to define a jsId.

Fixed in trunk and 1.9 release branch