Implementing Features in a Custom Widget

To improve our Simple Widget, we will be able to associate configurations so that our Simple Widget will be configurable and usable in different Views and Dashboards.

Configure the Dashboard/View

Edit the Widget Configuration

Configure the Widget

Configurations may store anything useful for your component. Configurations are JSON stored objects, so they do not contain any code. In an application any instance of a Custom Widget will have a different configuration instance associated. Configurations usually come with a Configurator Component that is an Angular Component and that will be used by the framework to let the user configure different instances of the Custom Widget.

Implementing the GeneBaseSimpleWidget will enable configuration support. The Platform automatically handles the persistence and the injection of these configurations in your application.

The Sample Widget component uses a Configuration type that allows the user to edit its title. A configurator class that allows the user to edit this title is provided as a sample source code.