I have a situation that widget A needs to access the config file of widget B. Widget A already has its own config file. I need to compare a field between the two configs from widget A js file. Possible? Thanks.
Solved! Go to Solution.
Perfect. Thank you.
Robert,
Can I perform some map operations (like set a new extent) in the linked js file, if I add the the BaseWidget module? I added it but it still can't recognize the map object.
define(['dojo/_base/declare',
'jimu/BaseWidget','dojo/Evented',
'dojo/on',
'dojo/_base/lang',
'dojo/_base/html',
'esri/request',
'esri/tasks/query',
'esri/tasks/QueryTask',
'esri/tasks/FeatureSet',
'dojo/keys',
'dojo/date/locale'
],
function (declare, BaseWidget, Evented, on, lang, html, esriRequest, Query, QueryTask, FeatureSet, keys, locale) {
return declare([BaseWidget,Evented], {
myfunction: function(){
alert(this.map.id)
}
});
});
I normally just pass the Widget object into the other module so you have access to all the widgets objects like map.