Tuesday, April 24, 2018

Minimal Mendix Widget

Herewith probably the most basic Mendix widget you can write
define(
 [
  "dojo/_base/declare",
  "mxui/widget/_WidgetBase",
 ],
 function(
  declare,
  _WidgetBase,
 ){
  "use strict";
  return declare(
   "mxempty.widget.main",
   [
    _WidgetBase,
   ],
   {
    constructor: function () {
    },
    postCreate: function () {
    }
   }
  );
 }
);
require(["mxempty/widget/main"]);

Does absolutely nothing, but showcases the various parts of a Dojo Dijit widget as used in Mendix. In later posts well take a look at how to extend this.

No comments:

Post a Comment