Description

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).

Finally have it working correctly. prependOnLoad() does not work, as that method is used by the dojo view helper inernally just prior to rendering to create the dijits -- which means that the dijit creation happens prior to store creation. I did figure it out, however, based on a comment on ZF-5987 by Erik Wahlstrom, and now have an onLoad event that creates the store and assigns it to the dijit's store attribute. I've tested this locally and the solution is solid.

The changes have been patched to trunk and the 1.8 release branch, and will go out with 1.8.4.

Posted by Jean-Fabrice (jeanfabrice) on 2009-07-06T05:25:09.000+0000

this ZF 1.8.4 fix seems to break the following setup, known to work in ZF 1.8.3:
1/ store is statically defined in a view :

With this setup and ZF 1.8.4, FilteringSelect appears empty while myStore is populated

Why am I doing things like this ? Because this is the only way I found to have a filteringselect combo working when loaded into a dojox.dialog (=dojo.dialog + executescript) with a xhrget request.

Jean-fabrice

Posted by Jean-Marc Rigade (holon) on 2009-07-09T02:00:59.000+0000

I have the same problem than Jean-Fabrice.
All my filtering select are empty.
I have some "linked" filteringselect, when I make change on the first list, the second is affected.
Now this dont work at all...

And I've a lot of filtering select in my webapp, what must I do ????

Posted by Kevin Craine (craineum) on 2009-07-14T07:58:26.000+0000

I don't know where else to put this comment, It probably is a new bug, or there might be a better work around.

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.