Hi Robert!
Thanks for the quick answer, but this piece of code does not work 😞
Widget.js
define(['dojo/_base/declare',
'dojo/store/Memory',
'jimu/BaseWidget',
'dojo/dom'],
function (declare, Memory, BaseWidget, dom) {
//To create a widget, you need to derive from BaseWidget.
return declare([BaseWidget], {
// Custom widget code goes here
baseClass: 'jimu-widget-mywidget',
startup: function() {
this.inherited(arguments);
//this.mapIdNode.innerHTML = 'map id is:' + this.map.id;
console.log('startup');
var cities = [
{
name: "city1",
value: 1
},
{
name: "city2",
value: 2
}
];
myStore = new Memory({data: cities});
this.cityCombo.set('store', myStore);
console.log('end');
}
});
});
widget.html
<div data-dojo-attach-point="cityCombo" data-dojo-type="dijit/form/FilteringSelect"
data-dojo-props="searchAttr:'name',intermediateChanges:true" class="dijit-form-FilteringSelect"></div>
but.. when I tried from my app, I get this error in de firebug..
TypeError: this.cityCombo.set is not a function
| this.cityCombo.set('store', myStore); |
I have tried with "put" function, with "dom.byId" but I am not able to make it works.
Any idea?
Thanks!
Marga