Description

If a ComboBox or FilteringSelect element is parsed before its store has been instantiated, it won't use the store. In previous versions of ZF, the ordering of dojo.addOnLoad functions put store creation before dijit parsing. In 1.7.6, dijits are parsed first (I believe this is because of [#ZF-4587]). This means forms using ComboBoxes and FilteringSelects which used to work in 1.7.5 no longer work correctly.

Comments

Posted by Erik Wahlstrom (ewahlstr) on 2009-03-12T02:45:37.000+0000

I am experiencing the same side-effects from the new changes in 1.7.6. Funny because I remember wanting the onLoadCaptureStart to function in this manner so we could utilize dojo.connect statements on parsed widgets - didn't foresee this problem though...

It appears as if the prependOnLoad() method of the Dojo view helper would solve this problem - simply create the data store like so:

Create the element without assigning the store and in the dojo()->onLoadCaptureStart() (since we can now grab our widgets using dijit.byId) create the store as usual and then assign it to the widget like so:

I have got JavaScript error: 'dojo.data is undefined' after migrating to ZF 1.7.7.
It seems that JavaScript tried to create new instance of dojo.data.ItemFileReadStore, but it is not loaded yet.

ItemFileReadStore instance should be created after page load, using dojo.addOnLoad method.
I think that using prependOnLoad (look at the first comment) instead of addJavascript (in ComboBox.php line 142).