2009年1月8日星期四

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

-- Nathan Garlington <garlinto@gmail.com> wrote
(on Thursday, 08 January 2009, 09:27 AM -0700):
> 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:

I cannot recreate this issue; I get the dl with a class of
"zend_form_dojo".

> // in my Zend_Dojo_Form extending class
> $this->addDecorator('Fieldset', array('legend' => 'text.....'));
>
> outputs a fieldset with legend, but no dl tag set.

Again, cannot recreate the issue. Can you send your complete code, or
provide a link to a pastebin?

> 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.

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: