2009年2月5日星期四

Re: [fw-mvc] Zend_Dojo_Form_Element_DateTextBox

> I think the problem is likely due to using a CDN for the theme -- and
> specifically using from a different version than your widgets. I'd
> recommend using local resources for this for the time being.
>
> Additionally, I'd recommend using the dojo() view helper to takecare of
> the above items. In your bootstrap, after you Dojo-enable the view, do
> the following:
>
> Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
> $view->dojo()->setLocalPath('/js/dojo-release-1.2.3-src/dojo/dojo.js')
> ->setDjConfigOption('parseOnLoad', true)
> ->addStyleSheetModule('dijit.themes.tundra');
>
> Then, in your layout, simply echo the dojo view helper:
>
> <?= $this->dojo() ?>
>
> You'll notice that the configuration does not include specifying a
> dojo.require statement for dijit.form.DateTextBox -- this is because
> rendering the form will hint to the dojo() view helper to add this.
>
> Let me know if the above makes a difference.

That definitely helped. I had to add:

Zend_Dojo::enableView($view);

Just before calling Zend_Dojo_View_Helper_Dojo.

I also had to add class=tundra to the body element of my layout, but
everything is now working properly.

Thanks for the help :)

-Ed

没有评论: