将自定义dijit元素添加到Zend Dojo Form

时间:2011-08-26 07:55:10

标签: zend-framework zend-form dojo zend-form-element

我想使用未包含在Zend Framework中的Dijit元素。但我不知道应该怎么做:

$subPrice = new Zend_Dojo_Form_SubForm('priceTab');
$subPrice->setLegend('Tarification :');

$sign = new Zend_Dojo_Form_Decorator_DijitElement('sign');
$sign->setDijitParams(array('dojoType' => 'dijit.form.ToggleButton',
                    'label'     =>  '-',
                    'showLabel' =>  true,
                    'checked'   =>  true,
                    'onChange'  =>  'toggleLabel(val)'
                                ));
$subPrice->addElement($sign);

在我看来,我刚刚在javascript中添加了dojo.require("dijit.form.Button");

但是我从addElement函数中收到此错误消息:

Fatal error: Call to a member function getOrder() on a non-object in D:\www\tuto\library\Zend\Form.php on line 1055

非常感谢任何帮助。

谢谢!

0 个答案:

没有答案