Friday, October 18, 2013

calling dojox events from HTML

<span class="icon-button" style="float: right"
   data-dojo-type="dojox.mobile.ToolBarButton"
   data-dojo-props="icon:'whatever', onClick: dojo.hitch(this, this.add)"></span>

 
 

The onClick above in a dojox view's HTML may trigger something like this in the sister .js file:

add: function(evt) {
   app.openView(this.domNode, {
      target: "somethingErOther",
      data: { }
   }, evt);
},

 
 

While I'm thinking of it, this shows off how to use a dojox attach point and the following are pretty good references for how to craft AMD modules:

No comments:

Post a Comment