Applications and Applets
Widgets
Widgets Editor
2 min
you define widgets with swimlane turbine's built in widget editor the editor consists of two main parts a code editor and a preview panel the code editor is where you define and modify your widget the code tab contains the code of the widget, while the preview record data tab contains the data that can be used to test and debug the widget while your are in the editor this data is generated to match the format of data that would be passed to the widget once it is rendered on the record/dashboard page the preview context data tab holds the current detail in context to the widget, such as which application it resides within, the fields and values it relies on, etc the preview panel renders the widget in real time and updates as changes are made to the widget code or the preview data every change you make will trigger the preview to update the editor has a base widget template which renders the data the widget receives in a \<pre> tag this template sets up the custom element to listen to any changes in the data and update itself any syntax errors in the widget's code are highlighted in the editor itself, and the preview is disabled until those errors are fixed any run time errors will display in the browser console where you can inspect them using the browser's developer tools swimlane recommends having your browser's developer tools open while building widgets