ZF-7194: Zend_Dojo_Form needs to be rendered before echoing dojo() in viewscript
Description
I had to read through the code, search for requireModule before I realized that echo $this->dojo() cannot be called before calling the $this->form->render() if the correct dojo.require() are to appear in the header. I would appreciate if this was clearly stated in the docs. This is obvious once one thinks of it but not always by default see Stackoverflow question 1 and question 2.
Currently in zend.dojo.view.html: {quote} In our layout script, we'll then check to see if Dojo is enabled, and, if so, we'll do some more general configuration and assemble it:
...code...
At this point, you only need to ensure that your files are in the correct locations and that you've created the end point action for your FilteringSelect! {quote}
I suggest add before "At this point" a "Make sure that any widgets created in the the layout are created before the echo $this->dojo() or the required modules etc won't be able to properly load".
Comments
Posted by Max Gordon (mgordon) on 2009-08-09T12:40:17.000+0000
Added a few suggestions to how the docs might be changed.
Posted by Max Gordon (mgordon) on 2011-01-27T23:57:45.000+0000
Changed to current docs