Custom Dojo Widget


/ Published in: JavaScript
Save to your folder(s)

This is a basic custom dojo widget. It mixes in dijit._Templated - this can be removed if not required. The default functions (constructor, postMixinProperties, postCreate and startup) are included in execution order.


Copy this code and paste it in your HTML
  1. dojo.provide('packge.ClassName');
  2. dojo.require('dijit._Widget');
  3. dojo.require('dijit._Templated');
  4. dojo.declare(
  5. 'packge.ClassName',
  6. [dijit._Widget, dijit._Templated],
  7. {
  8.  
  9. templatePath : dojo.moduleUrl('package','templates/ClassName.html'),
  10.  
  11. widgetsInTemplate : true,
  12.  
  13. constructor : function() {
  14.  
  15. },
  16.  
  17. postMixInProperties : function() {
  18.  
  19. },
  20.  
  21. postCreate : function() {
  22.  
  23. },
  24.  
  25. startup : function() {
  26.  
  27. }
  28. }
  29. )

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.