Hi everyone,
I am pretty new to WAB and Javacript development with Dojo. My plan is to generate a dynamic Combobox out of feature-layer attributes. On click the widget should add that specific feature-layer with the chosen layerexpression. e.g. Country selection ComboBox: "USA" -> Zoom on USA.
I got this to work in a standalone Javascript api, but now i'd like to include this into my WAB1.2 functionality set as a widget and I ran into several Dojo issues which I am not familiar with.
Basically I started a new widget from scratch:
Widget.js
define([
'dojo/_base/declare',
'jimu/BaseWidget',
'jimu/ConfigManager',
"jimu/WidgetManager",
'esri/layers/FeatureLayer',
"dijit/form/Select",
"dojo/query",
"dojo/ready",
"dijit/form/ComboBox",
"dojo/data/ItemFileReadStore",
"dojo/_base/array",
"dojo/on"
],
function(
declare,
BaseWidget,
ConfigManager,
WidgetManager,
FeatureLayer,
Select,
query,
ready,
ComboBox,
ItemFileReadStore,
array,
on
) {
return declare([BaseWidget], {
baseClass: 'definition_query',
onOpen: function () {
function init() {
queryTask = new esri.tasks.QueryTask