Issues

ZF-5304: Applying custom decorators to an Button Element, can't be done

Issue Type: Bug Created: 2008-12-18T02:56:30.000+0000 Last Updated: 2011-05-02T20:19:11.000+0000 Status: Resolved Fix version(s): Reporter: Maurice Kevenaar (mkevenaar) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Dojo

Related issues: - ZF-8854

Attachments:

Description

Because of strong typing in the Zend_Dojo_View_Helper_Button class, function button(), argument 4 is null when a decorator is set.

Same with SubmitButton, others not checked.

$this->addElement ( 'Button', 'closeBtn', array ('label' => 'Close', 'class' => 'CloseBtn', 'decorators' => array ( 'ViewHelper' ) ) );

-- or -- $this->addElement ( 'Button', 'closeBtn', array ('label' => 'Close', 'class' => 'CloseBtn' ) ); $this->setElementDecorators( array ('ViewHelper' ) );

Comments

Posted by Robert Basic (robertbasic) on 2011-04-22T15:41:26.000+0000

Apparently this happens only when using Zend_Form_Decorator_ViewHelper as a decorator, but does not happen when using Zend_Dojo_Form_Decorator_DijitElement.

Question is, should a Zend_Dojo_Form_Element be able to use a Zend_Form_Decorator? If no, then, I think, this is not an issue.

Posted by Matthew Weier O'Phinney (matthew) on 2011-05-02T17:22:14.000+0000

You can use any decorator, but we can't guarantee that it will work if you use something other than DijitElement when using Dojo form elements. I'm closing as "won't fix", as the solution is simply to use DijitElement instead of ViewHelper as the decorator.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts