Create own widget in Mendix

1
I want to create my own widget. Expected behavior of this widget will be something like this: Widget should look like some round button with some icon. Use should be able to place this widget anywhere. So it will not have any dependencies on dataview or any other widgets. On clicking on widget, a pop up window should get open which will have dataview into it.   Queries: I tried referring https://docs.mendix.com/howto/extensibility/pluggable-widgets  this tutorial which guides to build a text box. It uses Typescript. But I did not find it very helpful for building my widget. Is there any other resource which can guide me step by step for building widget using Javascript ? If I want my widget to open popup or execute the microflows on clicking on it. Is it possible to bundle them with widget ? If bundling the microflows is not possible, do i need to create separate  module for it ?    
asked
1 answers
1
  1. No, that's the defacto way of building widgets right now. But, you can find a load of examples on github: https://github.com/mendix/. When I started building widgets myself (I work at Mendix) a couple of years ago I started out looking at widgets that were already built
  2. Yes, that's possible. If you build a plugin widget you can define an action in your widget. In the Modeler you then define the action itself. If you would need multiple actions, you can define a list
  3. See 2. I don't understand exactly what you mean with 'bundling'

 

Looking at your requirements I think it would make more sense to just use a standard Mendix button, add an extra class and style your button in such a way that it's round. That takes less work, is less prone to errors (as a Button is a standard Mendix component). See styling docs: https://docs.mendix.com/howto7/front-end/style-with-gulp-and-sass

 

answered