Custom Widget - Multiple Define - jquery

94
0
12-16-2021 11:55 AM
B-L
by
New Contributor III

Hi,

In the WAB Developer edition, in the samplewidgets folder, there is a sample for jquery.  I copied the example into my custom widget and it resulted in a  'multiple define' error in Edge developer tools. Removing jquery from 'define'  in my widget resolved the 'multiple define' error, and as far as I can tell, jquery still works in my widget.

Is jquery already being loaded in at the app level somewhere? The app is using the 'dashboard theme' and besides the widget there is no other customization. I have not explicitly included jquery anywhere else in the app.

 

Thank you

 

BrackstonLand_0-1639683570970.png

 

 

 

 

define([
// dojo required modules
    "dojo/_base/declare",
    'dojo/_base/lang',
    "dojo/_base/array",
    "dojo/store/Memory",
// jimu required modules
    "jimu/BaseWidget",
    'jimu/loaderplugins/jquery-loader!https://code.jquery.com/jquery-git1.min.js',
    'jimu/dijit/Message',
// dgrid required modules
    "dgrid/OnDemandGrid",
    "dgrid/Selection",
    "dgrid/editor",
// esri required modules
    'esri/tasks/query',
    'esri/tasks/QueryTask',
    "esri/layers/FeatureLayer",
    'esri/graphic',
    'esri/Color',
    'esri/symbols/SimpleMarkerSymbol',
    'esri/symbols/SimpleLineSymbol',
// dijit required modules
    "dijit/form/Select",
    'dijit/_WidgetsInTemplateMixin',
    "dijit/layout/ContentPane"
  ],
  function (
// dojo required modules
    declare,
    lang,
    arrayUtils,
    Memory,
// jimu required modules
    BaseWidget,
    $,
    Message,
// dgrid required modules
    Grid,
    Selection,
    editor,	
// esri required modules
    Query,
    QueryTask,
    FeatureLayer,
    Graphic,
    Color,
    SimpleMarkerSymbol,
    SimpleLineSymbol,
// dijit required modules
    Select,
    _WidgetsInTemplateMixin

  ) {
	  
	  
    var clazz = declare([BaseWidget, _WidgetsInTemplateMixin], {

 

 

 

0 Kudos
0 Replies