2008年8月27日星期三

Re: [fw-mvc] viewHelper only decorator for Zend_Form_Element_MultiCheckbox

Hi Václav,

as an educated guess, I'd say you did not tell Zend_Form to use the view you added your custom helpers to. Search Zend_Form::setView() in the docs :-).

Best regards
Tobias

2008/8/27 Václav Vaník <vanik@walk.cz>

OK, I create my own:

Walk_View_Helper_FormMultiCheckboxFilter extends
Zend_View_Helper_FormMultiCheckbox

I added path to helper in bootstrap:

$view->addHelperPath(ROOT_DIR . '/app/valhalla/helpers',
'Walk_View_Helper');

Then I set decorator to multicheckbox element:

$checkbox->setDecorators(array('ViewHelper', array('helper' =>
'formMultiCheckboxFilter')));

but when I render form I get error:

Warning: Plugin by name FormMultiCheckboxFilter was not found in the
registry. in /path/library/Zend/Form/Element.php on line 1892

How could I fix it?


--
View this message in context: http://www.nabble.com/viewHelper-only-decorator-for-Zend_Form_Element_MultiCheckbox-tp19181211p19183452.html
Sent from the Zend MVC mailing list archive at Nabble.com.


没有评论: