I wasn't missing anything. The problem was that when Dojo was loading certain html files, my .htaccess file rewrote them to index.php and thus it did not work.
See this post for a .htaccess file that works with Dojo: http://blog.justanotherdeveloper.co.uk/2008/07/23/zend-framework-and-dojo/ I hope that gets added to the documentation. Peter Wansch wrote: > > Hi, > I am planning to use Dijit widgets such as dateTextBox in my ZF > application to benefit from client-side validating widgets. I don't want > to use Zend_Form but mostly stay with HTML and Dijit-specific view > helpers. Here is what I tried: > > First, in my controller action method, I set the helper path and enable > Dojo after initView: > $this->initView(); > $this->view->addHelperPath('Zend/Dojo/View/Helper', > 'Zend_Dojo_View_Helper'); > $this->view->dojo()->enable(); > > Second, in my layout script (html_header.phtml) I add the code to load > Dojo: > > <?= $this->doctype('XHTML1_TRANSITIONAL') ?> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <?= $this->headTitle($this->page_title) ?> > <?php $this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; > charset=UTF-8'); echo $this->headMeta(); ?> > <?php > $this->headLink()->appendStylesheet(Zend_Controller_Front::getInstance()->getBaseUrl() > . '/css/common.css'); echo $this->headLink(); ?> > <?= $this->headStyle() ?> > <?php if ($this->dojo()->isEnabled()): > > $this->dojo()->setLocalPath(Zend_Controller_Front::getInstance()->getBaseUrl() > .'/js/dojo/dojo/dojo.js') > ->addStyleSheetModule('dijit.themes.tundra'); > echo $this->dojo(); > endif; ?> > <?= $this->headScript() ?> > </head> > <body class="tundra"> > > Third, in my view script that gets included later I add the following: > > <?php > echo $this->dateTextBox( > 'foo', > '2008-07-11', > array('required' => true) > ); ?> > > When I render that view, all I get is the following in the source: > > <input id="foo" name="foo" value="2008-07-11" type="text" /> > > I checked the head URLs in the source and they are all correct: > > <head> > <title>GGV</title> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> > <link href="/GGV/www/css/common.css" media="screen" rel="stylesheet" > type="text/css" /> > > <style type="text/css"> > <!-- > @import "/GGV/www/js/dojo/dijit/themes/tundra/tundra.css"; > --> > </style> > > <script type="text/javascript" > src="/GGV/www/js/dojo/dojo/dojo.js"></script> > > > </head> > > What am I missing? Thanks, > Peter > -- View this message in context: http://www.nabble.com/Dijit-view-helper-generates-simple-input-element-for-dateTextBox-tp19282825p19386660.html Sent from the Zend Framework mailing list archive at Nabble.com.
