Zend_Dojo_Form local problem

If you have errors in the request object when trying to make your forms to use dojo, here is some clue. Dojo dijits use some html templates and .htaccess usually is not prepared for this.

You cand solve this problem by using the setCdnBase from Google or AOL, but if you reallly want the local version modify the .htaccess to allow html code.


$view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
$view->dojo()->setDjConfigOption('usePlainJson', true )
//->setCdnBase( Zend_Dojo::CDN_BASE_GOOGLE )
->addStyleSheetModule('dijit.themes.tundra')
->addStyleSheet('/js/dojo/dojox/grid/_grid/tundraGrid.css')
->setLocalPath('/js/dojo/dojo/dojo.js')
->disable()
;
Zend_Dojo_View_Helper_Dojo::setUseProgrammatic();

.htaccess code:

RewriteEngine on
RewriteRule !\.(js|ico|gif|jpg|png|css|html)$ index.php

UPDATE:
use this code instead
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ – [NC,L]
RewriteRule ^.*$ /index.php [NC,L]
Recommanded by Matthew Weier O’Phinney


About this entry