I've committed the initial implementation of the Dojo view helper to the
standard/incubator/ of our svn repository:
http://framework.zend.com/svn/framew...ard/incubator/
If you utilize it, you will need to do two things:
* Add the incubator library to your include_path
* Add a helper path to your view object:
1 2 3 4
| $view->addHelperPath(
'path/to/incubator/library/Zend/Dojo/View/Helper',
'Zend_Dojo_View_Helper'
); |
Once those steps are in place, you can setup most aspects of your Dojo
environment, including:
* Specifying either an (aol-only for now) CDN location or local path
to dojo.js
* Specifying dojo module paths
* Specifying dojo.require statements
* Specifying addOnLoad() callbacks
* Capturing arbitrary lambdas for addOnLoad
* Specifying stylesheets (either by module or path to stylesheets)
In the end, in your layout view script, simply do the following:
There are some known issues:
* No persistence between view objects
* Does not currently output arbitrary local stylesheets
I will be addressing these two issues tomorow, and then working on
documentation for the component.
Please test; feedback is always welcome!
Also, if you have time and are interested in the Dojo integration,
please review and comment on the following proposals:
* Zend_Form Dojo elements/decorators:
http://framework.zend.com/wiki/displ...d_Form+Widgets
* dojo.data component for ZF:
http://framework.zend.com/wiki/displ...er+O%27Phinney
Thanks!
Partager