I'm trying to make a widget which will perform some background task.
The user should have no interaction with it, so I would like this widget was started on webapplication startup, and was not visible.
I read in the doc that a preload wirdget will fit my needs, and I just need to set the manifest's property inPanel to false :
Hi,
I suggest you start with the basics of creating a new widget and adding it into WAB before modifying and customizing advanced/different default settings.
Have you ever managed to create a custom widget and add it to a WAB application before? if not, start with that through the tutorials or ready examples you can use - https://developers.arcgis.com/web-appbuilder/sample-code/create-custom-in-panel-widget.htm
Once you managed to create a custom widget and add it successfully to a WAB app, you can configure it to launch automatically when the app starts either through the WAB interface or through the JSON file, but this should be your last concern, it's an easy fix and it sounds like your widget isn't created properly.
Shay.
Hi @Raphiki , you have 2 options, one is to create one from scratch. Creating a onscreen widget is the same as creating all the other widget. The only difference is how you specify the manifest.json file.
example below
{
"name": "ScaleNElevation",
"platform": "HTML",
"2D": true,
"3D": false,
"version": "2.16",
"wabVersion": "2.16",
"author": "Victor Tey",
"description": "View current scale and set scale",
"copyright": "",
"license": "http://www.apache.org/licenses/LICENSE-2.0",
"openAtStart":true,
"properties": {
"inPanel": false,
"hasUIFile": true,
"supportMultiInstance": false,
"closeable": false,
"hasSettingPage": false,
"hasSettingUIFile" : false,
"hasConfig" : true,
"position": {
"left": 10,
"bottom": 60
}
}
}
Note the inPanel: false, closable false and position to place the widget. Above is a working copy of my manifest.json. Hope that helps
I succeed in making widget starting at application loading with openAtStart. Thanks a lot !
But now how to hide the plugin's icon ? The user has no interaction with the plugin so the icon is useless and confusing...