PDA

View Full Version : Xin mấy Pro cho hỏi tý về lỗi của Zend_Dojo



chanh63
04-05-2009, 23:41
Mấy anh cho em hỏi. Em tải được 1 demo Zend_Dojo về chạy thử. Khi chạy nó báo lỗi:

Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'Dojo' was not found in the registry; used paths: Zend_View_Helper_: Zend/View/Helper/;../application/views\helpers/' in C:\wamp\www\jodotest\library\Zend\Loader\PluginLoa der.php:390 Stack trace: #0 C:\wamp\www\jodotest\library\Zend\View\Abstract.ph p(1105): Zend_Loader_PluginLoader->load('Dojo') #1 C:\wamp\www\jodotest\library\Zend\View\Abstract.ph p(556): Zend_View_Abstract->_getPlugin('helper', 'dojo') #2 C:\wamp\www\jodotest\library\Zend\View\Abstract.ph p(323): Zend_View_Abstract->getHelper('dojo') #3 [internal function]: Zend_View_Abstract->__call('dojo', Array) #4 C:\wamp\www\jodotest\application\views\scripts\ind ex\index.phtml(3): Zend_View->dojo() #5 C:\wamp\www\jodotest\library\Zend\View.php(107): include('C:\wamp\www\jod...') #6 C:\wamp\www\jodotest\library\Zend\View\Abstract.ph p(820): Zend_View->_run('..\application\...') #7 C:\wamp\www\jodotest\library\Zend\Controller\Actio n\Helper\ViewRenderer.php(902): Zend_View_A in C:\wamp\www\jodotest\library\Zend\Loader\PluginLoa der.php on line 390

Demo chạy thử download ở đây:
http://techchorus.net/autocomplete-example-zenddojoformelementfilteringselect-and-zenddojodata

Em đã sửa lại code trong Demo:
- Sủa lại class name DemoControler thành IndexControler.
- Sửa file DemoControler thành IndexControler.php
- Sửa lại đoạn code ở file Boottrap.php:
// Setup Dojo Enviroment
Zend_Dojo::enableView($view);
$view->addHelperPath("Zend/Dojo/View/Helper", "Zend_Dojo_View_Helper");
$view->dojo()->enable();
$view->dojo()
->setLocalPath("../dojo/dojo/dojo.js")
->addStyleSheetModule('dijit.themes.tundra')
->setDjConfigOption('usePlainJson', true)
->disable();
nhưng vẫn báo lỗi trên.
Lưu ý: chưa có ZendFrameWork và Dojo toolkit kèm theo file Demo
Mấy anh có thể chỉ giúp em lỗi này không? Thanks