[Dojo-interest] On the fly declarative mixins?

Michael Schuerig michael at schuerig.de
Thu Apr 30 08:53:28 EDT 2009


I have a mixin class for forms that adds a function for resetting 
contained dojox.form.BusyButtons. IIUC, to use this functionality, I 
have to define a new class like this

dojo.declare("MyForm", [dijit.form.Form, my._Mixin], {});

This is pretty boring code and it gets worse when there are more mixins 
to mix and match. Instead, I'd like to mix-in on the fly at the point of 
use

<div dojoType="dijit.form.Form" mixin="my._Mixin" ...>
  ...
</div>

Is something similar already possible?

Michael

-- 
Michael Schuerig
mailto:michael at schuerig.de
http://www.schuerig.de/michael/



More information about the Dojo-interest mailing list