Zend Dojo在重复数字中添加了两次结果

时间:2010-07-12 20:46:13

标签: php zend-framework dojo

这一直很好,不知道为什么它突然停止了......基本上我收到了错误:

Notice: Duplicate dijit ID detected for id "email; temporarily generating uniqid" in ..\Zend\Dojo\Form\Decorator\DijitElement.php on line 171

如果我查看页面源代码,我的dojo JS已添加两次:

var zendDijits = [{"id":"email","params":{"required":"true","dojoType":"dijit.form.ValidationTextBox"}},{"id":"password","params":{"required":"true","dojoType":"dijit.form.ValidationTextBox"}},{"id":"submit","params":{"required":"false","dojoType":"dijit.form.Button"}},{"id":"email-4c3b7d9205842","params":{"required":"true","dojoType":"dijit.form.ValidationTextBox"}},{"id":"password-4c3b7d9206311","params":{"required":"true","dojoType":"dijit.form.ValidationTextBox"}},{"id":"submit-4c3b7d9206be5","params":{"required":"false","dojoType":"dijit.form.Button"}},{"id":null,"params":{"dojoType":"dijit.form.Form"}}];

表单项目只在页面上显示一次,是什么原因导致Zend认为其中不止一个?

回溯:

Notice: Duplicate dijit ID detected for id "email; temporarily generating uniqid" in ...\Zend\Dojo\Form\Decorator\DijitElement.php on line 171
Call Stack
#   Time    Memory  Function    Location
1   0.0009  370424  {main}( )   ..\index.php:0
2   0.2124  8373704 Zend_Application->run( )    ..\index.php:10
3   0.2124  8373704 Zend_Application_Bootstrap_Bootstrap->run( )    ..\Application.php:366
4   0.2125  8373760 Zend_Controller_Front->dispatch( )  ..\Bootstrap.php:97
5   0.2233  8739920 Zend_Controller_Dispatcher_Standard->dispatch( )    ..\Front.php:954
6   0.2467  9807848 Zend_Controller_Action->dispatch( ) ..\Standard.php:295
7   0.3161  12648736    Zend_Controller_Action_HelperBroker->notifyPostDispatch( )  ..\Action.php:523
8   0.3162  12649640    Zend_Controller_Action_Helper_ViewRenderer->postDispatch( ) ..\HelperBroker.php:277
9   0.3163  12649640    Zend_Controller_Action_Helper_ViewRenderer->render( )   ..\ViewRenderer.php:957
10  0.3169  12649808    Zend_Controller_Action_Helper_ViewRenderer->renderScript( ) ..\ViewRenderer.php:918
11  0.3170  12649808    Zend_View_Abstract->render( )   ..\ViewRenderer.php:897
12  0.3173  12690872    Zend_View->_run( )  ..\Abstract.php:880
13  0.3176  12692448    include( 'C:\wamp\www\cms\application\modules\default\views\auth\login.phtml' ) ..\View.php:108
14  0.3177  12692448    Zend_Form->__toString( )    ..\Form.php:0
15  0.3177  12692448    Zend_Form->render( )    ..\Form.php:2898
16  0.3178  12692528    Zend_Form_Decorator_FormElements->render( ) ..\Form.php:2882
17  0.3181  12692824    Zend_Form_Element->render( )    ..\FormElements.php:101
18  0.3181  12692904    Zend_Dojo_Form_Decorator_DijitElement->render( )    ..\Element.php:2016
19  0.3182  12693488    trigger_error ( )   ..\DijitElement.php:171

1 个答案:

答案 0 :(得分:0)

事实证明,尽管内容没有被渲染两次,但视图中的render()函数却是。显然,这会覆盖以前对布局内容的任何render()调用,但不会覆盖注册表中的其他元素使用的内容。