require({cache:{ 'url:dijit/form/templates/DropDownBox.html':"
\n"}}); define("dijit/form/ComboBoxMixin", [ "dojo/_base/declare", // declare "dojo/_base/Deferred", "dojo/_base/kernel", // kernel.deprecated "dojo/_base/lang", // lang.mixin "dojo/store/util/QueryResults", // dojo.store.util.QueryResults "./_AutoCompleterMixin", "./_ComboBoxMenu", "../_HasDropDown", "dojo/text!./templates/DropDownBox.html" ], function(declare, Deferred, kernel, lang, QueryResults, _AutoCompleterMixin, _ComboBoxMenu, _HasDropDown, template){ /*===== var _AutoCompleterMixin = dijit.form._AutoCompleterMixin; var _ComboBoxMenu = dijit.form._ComboBoxMenu; var _HasDropDown = dijit._HasDropDown; =====*/ // module: // dijit/form/ComboBoxMixin // summary: // Provides main functionality of ComboBox widget return declare("dijit.form.ComboBoxMixin", [_HasDropDown, _AutoCompleterMixin], { // summary: // Provides main functionality of ComboBox widget // dropDownClass: [protected extension] Function String // Dropdown widget class used to select a date/time. // Subclasses should specify this. dropDownClass: _ComboBoxMenu, // hasDownArrow: Boolean // Set this textbox to have a down arrow button, to display the drop down list. // Defaults to true. hasDownArrow: true, templateString: template, baseClass: "dijitTextBox dijitComboBox", /*===== // store: [const] dojo.store.api.Store || dojo.data.api.Read // Reference to data provider object used by this ComboBox. // // Should be dojo.store.api.Store, but dojo.data.api.Read supported // for backwards compatibility. store: null, =====*/ // Set classes like dijitDownArrowButtonHover depending on // mouse action over button node cssStateNodes: { "_buttonNode": "dijitDownArrowButton" }, _setHasDownArrowAttr: function(/*Boolean*/ val){ this._set("hasDownArrow", val); this._buttonNode.style.display = val ? "" : "none"; }, _showResultList: function(){ // hide the tooltip this.displayMessage(""); this.inherited(arguments); }, _setStoreAttr: function(store){ // For backwards-compatibility, accept dojo.data store in addition to dojo.store.store. Remove in 2.0. if(!store.get){ lang.mixin(store, { _oldAPI: true, get: function(id){ // summary: // Retrieves an object by it's identity. This will trigger a fetchItemByIdentity. // Like dojo.store.DataStore.get() except returns native item. var deferred = new Deferred(); this.fetchItemByIdentity({ identity: id, onItem: function(object){ deferred.resolve(object); }, onError: function(error){ deferred.reject(error); } }); return deferred.promise; }, query: function(query, options){ // summary: // Queries the store for objects. Like dojo.store.DataStore.query() // except returned Deferred contains array of native items. var deferred = new Deferred(function(){ fetchHandle.abort && fetchHandle.abort(); }); var fetchHandle = this.fetch(lang.mixin({ query: query, onBegin: function(count){ deferred.total = count; }, onComplete: function(results){ deferred.resolve(results); }, onError: function(error){ deferred.reject(error); } }, options)); return QueryResults(deferred); } }); } this._set("store", store); }, postMixInProperties: function(){ // Since _setValueAttr() depends on this.store, _setStoreAttr() needs to execute first. // Unfortunately, without special code, it ends up executing second. if(this.params.store){ this._setStoreAttr(this.params.store); } this.inherited(arguments); // User may try to access this.store.getValue() etc. in a custom labelFunc() function. // It's not available with the new data store for handling inline