2009年1月8日星期四

[fw-mvc] Zend_Form: dl not output unless a display group is created

I have some forms I was refactoring to take advantage of the dojo
implementations found in ZF1.7.1 and everything looks great! However,
one of my forms wouldn't obey the styles I had written for it, and
after some investigating, I realized that unless I call:

// in my Zend_Dojo_Form extending class
$this->addDisplayGroup(array('someElements', ........, 'myDisplayGroup'));
$this->myDisplayGroup->addDecorator('Fieldset', array('legend' => 'text.....'));

I don't get a 'dl' tag set generated. Also, calling:

// in my Zend_Dojo_Form extending class
$this->addDecorator('Fieldset', array('legend' => 'text.....'));

outputs a fieldset with legend, but no dl tag set. Am I implementing
something wrong? Is it the intent of the Zend_Form designers that we
add fieldset decorators only to displayGroups and
not to the form itself? The form in question is an extremely simple
one, and to just add a fieldset to $this would be sufficient for me,
as long as it output the dl tags.

--
Regards,
Nathan

没有评论: