-- Ralikwen <[email protected]> wrote (on Sunday, 25 October 2009, 01:31 AM -0700): > I am using custom decorators to add javascript capabilities to zend form > elements (tooltip, calendar, calculating default value based on other > element values). > > These capabilities are additional - meaning that maybe more then one could > be present on an element so I am looking for a way to add a decorator to an > element in the config file without side effects - like clearing the existing > decorators on it or having to set the decorator to all elements. > > I am struggling to find a solution for this and appreciate any help.
When passing configuration to a constructor or factory, you are calling a setter -- which always overwrites. The assumption is that you are defining the *exact* behavior you want for the element being configured. As such, you must define the entire decorator chain when doing so. -- Matthew Weier O'Phinney Project Lead | [email protected] Zend Framework | http://framework.zend.com/
