a:27:{s:9:"#provides";s:26:"dijit.form.FilteringSelect";s:9:"#resource";s:23:"form/FilteringSelect.js";s:9:"#requires";a:1:{i:0;a:2:{i:0;s:6:"common";i:1;s:19:"dijit.form.ComboBox";}}s:26:"dijit.form.FilteringSelect";a:6:{s:4:"type";s:8:"Function";s:6:"chains";a:2:{s:9:"prototype";a:1:{i:0;s:24:"dijit.form.MappedTextBox";}s:4:"call";a:2:{i:0;s:24:"dijit.form.MappedTextBox";i:1;s:24:"dijit.form.ComboBoxMixin";}}s:6:"mixins";a:1:{s:9:"prototype";a:1:{i:0;s:34:"dijit.form.ComboBoxMixin.prototype";}}s:7:"summary";s:65:"An enhanced version of the HTML SELECT tag, populated dynamically";s:11:"description";s:1113:"An enhanced version of the HTML SELECT tag, populated dynamically. It works very nicely with very large data sets because it can load and page data as needed. It also resembles ComboBox, but does not allow values outside of the provided ones. If OPTION tags are used as the data provider via markup, then the OPTION tag's child text node is used as the displayed value when selected while the OPTION tag's value attribute is used as the widget value on form submit. To set the default value when using OPTION tags, specify the selected attribute on 1 of the child OPTION tags. Similar features: - There is a drop down list of possible values. - You can only enter a value from the drop down list. (You can't enter an arbitrary value.) - The value submitted with the form is the hidden value (ex: CA), not the displayed value a.k.a. label (ex: California) Enhancements over plain HTML version: - If you type in some text then it will filter down the list of possible values in the drop down list. - List can be specified either as a static list or via a javascript function (that can get the list from a server)";s:9:"classlike";b:1;}s:35:"dijit.form.FilteringSelect._isvalid";a:4:{s:9:"prototype";s:26:"dijit.form.FilteringSelect";s:8:"instance";s:26:"dijit.form.FilteringSelect";s:7:"private";b:1;s:7:"summary";s:0:"";}s:35:"dijit.form.FilteringSelect.required";a:3:{s:9:"prototype";s:26:"dijit.form.FilteringSelect";s:4:"type";s:7:"Boolean";s:7:"summary";s:58:"True if user is required to enter a value into this field.";}s:46:"dijit.form.FilteringSelect._lastDisplayedValue";a:4:{s:9:"prototype";s:26:"dijit.form.FilteringSelect";s:8:"instance";s:26:"dijit.form.FilteringSelect";s:7:"private";b:1;s:7:"summary";s:0:"";}s:34:"dijit.form.FilteringSelect.isValid";a:5:{s:9:"prototype";s:26:"dijit.form.FilteringSelect";s:4:"type";s:8:"Function";s:6:"source";s:1863:"dojo.provide("dijit.form.FilteringSelect"); dojo.require("dijit.form.ComboBox"); dojo.declare( "dijit.form.FilteringSelect", [dijit.form.MappedTextBox, dijit.form.ComboBoxMixin], { // summary: // An enhanced version of the HTML SELECT tag, populated dynamically // // description: // An enhanced version of the HTML SELECT tag, populated dynamically. It works // very nicely with very large data sets because it can load and page data as needed. // It also resembles ComboBox, but does not allow values outside of the provided ones. // If OPTION tags are used as the data provider via markup, then the // OPTION tag's child text node is used as the displayed value when selected // while the OPTION tag's value attribute is used as the widget value on form submit. // To set the default value when using OPTION tags, specify the selected // attribute on 1 of the child OPTION tags. // // Similar features: // - There is a drop down list of possible values. // - You can only enter a value from the drop down list. (You can't // enter an arbitrary value.) // - The value submitted with the form is the hidden value (ex: CA), // not the displayed value a.k.a. label (ex: California) // // Enhancements over plain HTML version: // - If you type in some text then it will filter down the list of // possible values in the drop down list. // - List can be specified either as a static list or via a javascript // function (that can get the list from a server) _isvalid: true, // required: Boolean // True if user is required to enter a value into this field. required: true, _lastDisplayedValue: "", isValid: function(){ // Overrides ValidationTextBox.isValid() return this._isvalid || (!this.required && this.attr('displayedValue') == ""); // #5974";s:7:"returns";s:5:"#5974";s:7:"summary";s:0:"";}s:44:"dijit.form.FilteringSelect._callbackSetLabel";a:8:{s:9:"prototype";s:26:"dijit.form.FilteringSelect";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:6:"result";a:1:{s:4:"type";s:5:"Array";}s:10:"dataObject";a:1:{s:4:"type";s:6:"Object";}s:14:"priorityChange";a:2:{s:8:"optional";b:1;s:4:"type";s:7:"Boolean";}}s:6:"source";s:2905:"dojo.provide("dijit.form.FilteringSelect"); dojo.require("dijit.form.ComboBox"); dojo.declare( "dijit.form.FilteringSelect", [dijit.form.MappedTextBox, dijit.form.ComboBoxMixin], { // summary: // An enhanced version of the HTML SELECT tag, populated dynamically // // description: // An enhanced version of the HTML SELECT tag, populated dynamically. It works // very nicely with very large data sets because it can load and page data as needed. // It also resembles ComboBox, but does not allow values outside of the provided ones. // If OPTION tags are used as the data provider via markup, then the // OPTION tag's child text node is used as the displayed value when selected // while the OPTION tag's value attribute is used as the widget value on form submit. // To set the default value when using OPTION tags, specify the selected // attribute on 1 of the child OPTION tags. // // Similar features: // - There is a drop down list of possible values. // - You can only enter a value from the drop down list. (You can't // enter an arbitrary value.) // - The value submitted with the form is the hidden value (ex: CA), // not the displayed value a.k.a. label (ex: California) // // Enhancements over plain HTML version: // - If you type in some text then it will filter down the list of // possible values in the drop down list. // - List can be specified either as a static list or via a javascript // function (that can get the list from a server) _isvalid: true, // required: Boolean // True if user is required to enter a value into this field. required: true, _lastDisplayedValue: "", isValid: function(){ // Overrides ValidationTextBox.isValid() return this._isvalid || (!this.required && this.attr('displayedValue') == ""); // #5974 }, _callbackSetLabel: function( /*Array*/ result, /*Object*/ dataObject, /*Boolean?*/ priorityChange){ // summary: // Callback function that dynamically sets the label of the // ComboBox // setValue does a synchronous lookup, // so it calls _callbackSetLabel directly, // and so does not pass dataObject // still need to test against _lastQuery in case it came too late if((dataObject && dataObject.query[this.searchAttr] != this._lastQuery)||(!dataObject && result.length && this.store.getIdentity(result[0])!= this._lastQuery)){ return; } if(!result.length){ //#3268: do nothing on bad input //this._setValue("", ""); //#3285: change CSS to indicate error this.valueNode.value = ""; dijit.form.TextBox.superclass._setValueAttr.call(this, "", priorityChange || (priorityChange===undefined && !this._focused)); this._isvalid = false; this.validate(this._focused); this.item = null; }else{ this._setValueFromItem(result[0], priorityChange); }";s:7:"returns";s:5:"#5974";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:43:"dijit.form.TextBox.superclass._setValueAttr";}}s:7:"private";b:1;s:7:"summary";s:0:"";}s:42:"dijit.form.FilteringSelect._openResultList";a:8:{s:9:"prototype";s:26:"dijit.form.FilteringSelect";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:7:"results";a:1:{s:4:"type";s:6:"Object";}s:10:"dataObject";a:1:{s:4:"type";s:6:"Object";}}s:6:"source";s:3367:"dojo.provide("dijit.form.FilteringSelect"); dojo.require("dijit.form.ComboBox"); dojo.declare( "dijit.form.FilteringSelect", [dijit.form.MappedTextBox, dijit.form.ComboBoxMixin], { // summary: // An enhanced version of the HTML SELECT tag, populated dynamically // // description: // An enhanced version of the HTML SELECT tag, populated dynamically. It works // very nicely with very large data sets because it can load and page data as needed. // It also resembles ComboBox, but does not allow values outside of the provided ones. // If OPTION tags are used as the data provider via markup, then the // OPTION tag's child text node is used as the displayed value when selected // while the OPTION tag's value attribute is used as the widget value on form submit. // To set the default value when using OPTION tags, specify the selected // attribute on 1 of the child OPTION tags. // // Similar features: // - There is a drop down list of possible values. // - You can only enter a value from the drop down list. (You can't // enter an arbitrary value.) // - The value submitted with the form is the hidden value (ex: CA), // not the displayed value a.k.a. label (ex: California) // // Enhancements over plain HTML version: // - If you type in some text then it will filter down the list of // possible values in the drop down list. // - List can be specified either as a static list or via a javascript // function (that can get the list from a server) _isvalid: true, // required: Boolean // True if user is required to enter a value into this field. required: true, _lastDisplayedValue: "", isValid: function(){ // Overrides ValidationTextBox.isValid() return this._isvalid || (!this.required && this.attr('displayedValue') == ""); // #5974 }, _callbackSetLabel: function( /*Array*/ result, /*Object*/ dataObject, /*Boolean?*/ priorityChange){ // summary: // Callback function that dynamically sets the label of the // ComboBox // setValue does a synchronous lookup, // so it calls _callbackSetLabel directly, // and so does not pass dataObject // still need to test against _lastQuery in case it came too late if((dataObject && dataObject.query[this.searchAttr] != this._lastQuery)||(!dataObject && result.length && this.store.getIdentity(result[0])!= this._lastQuery)){ return; } if(!result.length){ //#3268: do nothing on bad input //this._setValue("", ""); //#3285: change CSS to indicate error this.valueNode.value = ""; dijit.form.TextBox.superclass._setValueAttr.call(this, "", priorityChange || (priorityChange===undefined && !this._focused)); this._isvalid = false; this.validate(this._focused); this.item = null; }else{ this._setValueFromItem(result[0], priorityChange); } }, _openResultList: function(/*Object*/ results, /*Object*/ dataObject){ // Overrides ComboBox._openResultList() // #3285: tap into search callback to see if user's query resembles a match if(dataObject.query[this.searchAttr] != this._lastQuery){ return; } this._isvalid = results.length != 0; // FIXME: should this be greater-than? this.validate(true); dijit.form.ComboBoxMixin.prototype._openResultList.apply(this, arguments);";s:7:"returns";s:5:"#5974";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:50:"dijit.form.ComboBoxMixin.prototype._openResultList";}}s:7:"private";b:1;s:7:"summary";s:0:"";}s:40:"dijit.form.FilteringSelect._getValueAttr";a:6:{s:9:"prototype";s:26:"dijit.form.FilteringSelect";s:4:"type";s:8:"Function";s:6:"source";s:3690:"dojo.provide("dijit.form.FilteringSelect"); dojo.require("dijit.form.ComboBox"); dojo.declare( "dijit.form.FilteringSelect", [dijit.form.MappedTextBox, dijit.form.ComboBoxMixin], { // summary: // An enhanced version of the HTML SELECT tag, populated dynamically // // description: // An enhanced version of the HTML SELECT tag, populated dynamically. It works // very nicely with very large data sets because it can load and page data as needed. // It also resembles ComboBox, but does not allow values outside of the provided ones. // If OPTION tags are used as the data provider via markup, then the // OPTION tag's child text node is used as the displayed value when selected // while the OPTION tag's value attribute is used as the widget value on form submit. // To set the default value when using OPTION tags, specify the selected // attribute on 1 of the child OPTION tags. // // Similar features: // - There is a drop down list of possible values. // - You can only enter a value from the drop down list. (You can't // enter an arbitrary value.) // - The value submitted with the form is the hidden value (ex: CA), // not the displayed value a.k.a. label (ex: California) // // Enhancements over plain HTML version: // - If you type in some text then it will filter down the list of // possible values in the drop down list. // - List can be specified either as a static list or via a javascript // function (that can get the list from a server) _isvalid: true, // required: Boolean // True if user is required to enter a value into this field. required: true, _lastDisplayedValue: "", isValid: function(){ // Overrides ValidationTextBox.isValid() return this._isvalid || (!this.required && this.attr('displayedValue') == ""); // #5974 }, _callbackSetLabel: function( /*Array*/ result, /*Object*/ dataObject, /*Boolean?*/ priorityChange){ // summary: // Callback function that dynamically sets the label of the // ComboBox // setValue does a synchronous lookup, // so it calls _callbackSetLabel directly, // and so does not pass dataObject // still need to test against _lastQuery in case it came too late if((dataObject && dataObject.query[this.searchAttr] != this._lastQuery)||(!dataObject && result.length && this.store.getIdentity(result[0])!= this._lastQuery)){ return; } if(!result.length){ //#3268: do nothing on bad input //this._setValue("", ""); //#3285: change CSS to indicate error this.valueNode.value = ""; dijit.form.TextBox.superclass._setValueAttr.call(this, "", priorityChange || (priorityChange===undefined && !this._focused)); this._isvalid = false; this.validate(this._focused); this.item = null; }else{ this._setValueFromItem(result[0], priorityChange); } }, _openResultList: function(/*Object*/ results, /*Object*/ dataObject){ // Overrides ComboBox._openResultList() // #3285: tap into search callback to see if user's query resembles a match if(dataObject.query[this.searchAttr] != this._lastQuery){ return; } this._isvalid = results.length != 0; // FIXME: should this be greater-than? this.validate(true); dijit.form.ComboBoxMixin.prototype._openResultList.apply(this, arguments); }, _getValueAttr: function(){ // summary: // Hook for attr('value') to work. // don't get the textbox value but rather the previously set hidden value // TODO: seems suspicious that we need this; how is FilteringSelect different // than another MappedTextBox widget? return this.valueNode.value;";s:7:"returns";s:5:"#5974";s:7:"private";b:1;s:7:"summary";s:0:"";}s:41:"dijit.form.FilteringSelect._getValueField";a:6:{s:9:"prototype";s:26:"dijit.form.FilteringSelect";s:4:"type";s:8:"Function";s:6:"source";s:3788:"dojo.provide("dijit.form.FilteringSelect"); dojo.require("dijit.form.ComboBox"); dojo.declare( "dijit.form.FilteringSelect", [dijit.form.MappedTextBox, dijit.form.ComboBoxMixin], { // summary: // An enhanced version of the HTML SELECT tag, populated dynamically // // description: // An enhanced version of the HTML SELECT tag, populated dynamically. It works // very nicely with very large data sets because it can load and page data as needed. // It also resembles ComboBox, but does not allow values outside of the provided ones. // If OPTION tags are used as the data provider via markup, then the // OPTION tag's child text node is used as the displayed value when selected // while the OPTION tag's value attribute is used as the widget value on form submit. // To set the default value when using OPTION tags, specify the selected // attribute on 1 of the child OPTION tags. // // Similar features: // - There is a drop down list of possible values. // - You can only enter a value from the drop down list. (You can't // enter an arbitrary value.) // - The value submitted with the form is the hidden value (ex: CA), // not the displayed value a.k.a. label (ex: California) // // Enhancements over plain HTML version: // - If you type in some text then it will filter down the list of // possible values in the drop down list. // - List can be specified either as a static list or via a javascript // function (that can get the list from a server) _isvalid: true, // required: Boolean // True if user is required to enter a value into this field. required: true, _lastDisplayedValue: "", isValid: function(){ // Overrides ValidationTextBox.isValid() return this._isvalid || (!this.required && this.attr('displayedValue') == ""); // #5974 }, _callbackSetLabel: function( /*Array*/ result, /*Object*/ dataObject, /*Boolean?*/ priorityChange){ // summary: // Callback function that dynamically sets the label of the // ComboBox // setValue does a synchronous lookup, // so it calls _callbackSetLabel directly, // and so does not pass dataObject // still need to test against _lastQuery in case it came too late if((dataObject && dataObject.query[this.searchAttr] != this._lastQuery)||(!dataObject && result.length && this.store.getIdentity(result[0])!= this._lastQuery)){ return; } if(!result.length){ //#3268: do nothing on bad input //this._setValue("", ""); //#3285: change CSS to indicate error this.valueNode.value = ""; dijit.form.TextBox.superclass._setValueAttr.call(this, "", priorityChange || (priorityChange===undefined && !this._focused)); this._isvalid = false; this.validate(this._focused); this.item = null; }else{ this._setValueFromItem(result[0], priorityChange); } }, _openResultList: function(/*Object*/ results, /*Object*/ dataObject){ // Overrides ComboBox._openResultList() // #3285: tap into search callback to see if user's query resembles a match if(dataObject.query[this.searchAttr] != this._lastQuery){ return; } this._isvalid = results.length != 0; // FIXME: should this be greater-than? this.validate(true); dijit.form.ComboBoxMixin.prototype._openResultList.apply(this, arguments); }, _getValueAttr: function(){ // summary: // Hook for attr('value') to work. // don't get the textbox value but rather the previously set hidden value // TODO: seems suspicious that we need this; how is FilteringSelect different // than another MappedTextBox widget? return this.valueNode.value; }, _getValueField: function(){ // Overrides ComboBox._getValueField() return "value";";s:7:"returns";s:5:"#5974";s:7:"private";b:1;s:7:"summary";s:0:"";}s:36:"dijit.form.FilteringSelect._setValue";a:8:{s:9:"prototype";s:26:"dijit.form.FilteringSelect";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:5:"value";a:1:{s:4:"type";s:6:"String";}s:14:"displayedValue";a:1:{s:4:"type";s:6:"String";}s:14:"priorityChange";a:2:{s:8:"optional";b:1;s:4:"type";s:7:"Boolean";}}s:6:"source";s:184:" this.valueNode.value = value; dijit.form.FilteringSelect.superclass._setValueAttr.call(this, value, priorityChange, displayedValue); this._lastDisplayedValue = displayedValue;";s:7:"summary";s:206:"Internal function for setting the displayed value and hidden value. Differs from _setValueAttr() in that _setValueAttr() only takes a single value argument, and has to look up the displayed value from that.";s:4:"tags";s:7:"private";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:51:"dijit.form.FilteringSelect.superclass._setValueAttr";}}s:7:"private";b:1;}s:40:"dijit.form.FilteringSelect._setValueAttr";a:7:{s:9:"prototype";s:26:"dijit.form.FilteringSelect";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"value";a:1:{s:4:"type";s:6:"String";}s:14:"priorityChange";a:2:{s:8:"optional";b:1;s:4:"type";s:7:"Boolean";}}s:6:"source";s:937:" if(!this._onChangeActive){ priorityChange = null; } this._lastQuery = value; if(value === null || value === ''){ this._setDisplayedValueAttr('', priorityChange); return; } //#3347: fetchItemByIdentity if no keyAttr specified var self = this; var handleFetchByIdentity = function(item, priorityChange){ if(item){ if(self.store.isItemLoaded(item)){ self._callbackSetLabel([item], undefined, priorityChange); }else{ self.store.loadItem({ item: item, onItem: function(result, dataObject){ self._callbackSetLabel(result, dataObject, priorityChange); } }); } }else{ self._isvalid = false; // prevent errors from Tooltip not being created yet self.validate(false); } }; this.store.fetchItemByIdentity({ identity: value, onItem: function(item){ handleFetchByIdentity(item, priorityChange); } });";s:7:"summary";s:35:"Hook so attr('value', value) works.";s:11:"description";s:95:"Sets the value of the select. Also sets the label to the corresponding value by reverse lookup.";s:7:"private";b:1;}s:44:"dijit.form.FilteringSelect._setValueFromItem";a:8:{s:9:"prototype";s:26:"dijit.form.FilteringSelect";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"item";a:1:{s:4:"type";s:4:"item";}s:14:"priorityChange";a:2:{s:8:"optional";b:1;s:4:"type";s:7:"Boolean";}}s:6:"source";s:174:" this._isvalid = true; this.item = item; // Fix #6381 this._setValue( this.store.getIdentity(item), this.labelFunc(item, this.store), priorityChange);";s:7:"summary";s:117:"Set the displayed valued in the input box, and the hidden value that gets submitted, based on a dojo.data store item.";s:11:"description";s:118:"Users shouldn't call this function; they should be calling attr('displayedValue', value) or attr('value', ...) instead";s:4:"tags";s:7:"private";s:7:"private";b:1;}s:36:"dijit.form.FilteringSelect.labelFunc";a:7:{s:9:"prototype";s:26:"dijit.form.FilteringSelect";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"item";a:1:{s:4:"type";s:4:"item";}s:5:"store";a:1:{s:4:"type";s:15:"dojo.data.store";}}s:6:"source";s:48:" return store.getValue(item, this.searchAttr);";s:7:"summary";s:64:"Computes the label to display based on the dojo.data store item.";s:14:"return_summary";s:42:"The label that the ComboBox should display";s:4:"tags";s:7:"private";}s:36:"dijit.form.FilteringSelect._doSelect";a:7:{s:9:"prototype";s:26:"dijit.form.FilteringSelect";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"tgt";a:1:{s:4:"type";s:5:"Event";}}s:6:"source";s:42:" this._setValueFromItem(tgt.item, true);";s:7:"summary";s:87:"Overrides ComboBox._doSelect(), the method called when an item in the menu is selected.";s:11:"description";s:112:"FilteringSelect overrides this to set both the visible and hidden value from the information stored in the menu.";s:7:"private";b:1;}s:49:"dijit.form.FilteringSelect._setDisplayedValueAttr";a:7:{s:9:"prototype";s:26:"dijit.form.FilteringSelect";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"label";a:1:{s:4:"type";s:6:"String";}s:14:"priorityChange";a:2:{s:8:"optional";b:1;s:4:"type";s:7:"Boolean";}}s:6:"source";s:8500:"dojo.provide("dijit.form.FilteringSelect"); dojo.require("dijit.form.ComboBox"); dojo.declare( "dijit.form.FilteringSelect", [dijit.form.MappedTextBox, dijit.form.ComboBoxMixin], { // summary: // An enhanced version of the HTML SELECT tag, populated dynamically // // description: // An enhanced version of the HTML SELECT tag, populated dynamically. It works // very nicely with very large data sets because it can load and page data as needed. // It also resembles ComboBox, but does not allow values outside of the provided ones. // If OPTION tags are used as the data provider via markup, then the // OPTION tag's child text node is used as the displayed value when selected // while the OPTION tag's value attribute is used as the widget value on form submit. // To set the default value when using OPTION tags, specify the selected // attribute on 1 of the child OPTION tags. // // Similar features: // - There is a drop down list of possible values. // - You can only enter a value from the drop down list. (You can't // enter an arbitrary value.) // - The value submitted with the form is the hidden value (ex: CA), // not the displayed value a.k.a. label (ex: California) // // Enhancements over plain HTML version: // - If you type in some text then it will filter down the list of // possible values in the drop down list. // - List can be specified either as a static list or via a javascript // function (that can get the list from a server) _isvalid: true, // required: Boolean // True if user is required to enter a value into this field. required: true, _lastDisplayedValue: "", isValid: function(){ // Overrides ValidationTextBox.isValid() return this._isvalid || (!this.required && this.attr('displayedValue') == ""); // #5974 }, _callbackSetLabel: function( /*Array*/ result, /*Object*/ dataObject, /*Boolean?*/ priorityChange){ // summary: // Callback function that dynamically sets the label of the // ComboBox // setValue does a synchronous lookup, // so it calls _callbackSetLabel directly, // and so does not pass dataObject // still need to test against _lastQuery in case it came too late if((dataObject && dataObject.query[this.searchAttr] != this._lastQuery)||(!dataObject && result.length && this.store.getIdentity(result[0])!= this._lastQuery)){ return; } if(!result.length){ //#3268: do nothing on bad input //this._setValue("", ""); //#3285: change CSS to indicate error this.valueNode.value = ""; dijit.form.TextBox.superclass._setValueAttr.call(this, "", priorityChange || (priorityChange===undefined && !this._focused)); this._isvalid = false; this.validate(this._focused); this.item = null; }else{ this._setValueFromItem(result[0], priorityChange); } }, _openResultList: function(/*Object*/ results, /*Object*/ dataObject){ // Overrides ComboBox._openResultList() // #3285: tap into search callback to see if user's query resembles a match if(dataObject.query[this.searchAttr] != this._lastQuery){ return; } this._isvalid = results.length != 0; // FIXME: should this be greater-than? this.validate(true); dijit.form.ComboBoxMixin.prototype._openResultList.apply(this, arguments); }, _getValueAttr: function(){ // summary: // Hook for attr('value') to work. // don't get the textbox value but rather the previously set hidden value // TODO: seems suspicious that we need this; how is FilteringSelect different // than another MappedTextBox widget? return this.valueNode.value; }, _getValueField: function(){ // Overrides ComboBox._getValueField() return "value"; }, _setValue: function( /*String*/ value, /*String*/ displayedValue, /*Boolean?*/ priorityChange){ // summary: // Internal function for setting the displayed value and hidden value. // Differs from _setValueAttr() in that _setValueAttr() only takes a single // value argument, and has to look up the displayed value from that. // tags: // private this.valueNode.value = value; dijit.form.FilteringSelect.superclass._setValueAttr.call(this, value, priorityChange, displayedValue); this._lastDisplayedValue = displayedValue; }, _setValueAttr: function(/*String*/ value, /*Boolean?*/ priorityChange){ // summary: // Hook so attr('value', value) works. // description: // Sets the value of the select. // Also sets the label to the corresponding value by reverse lookup. if(!this._onChangeActive){ priorityChange = null; } this._lastQuery = value; if(value === null || value === ''){ this._setDisplayedValueAttr('', priorityChange); return; } //#3347: fetchItemByIdentity if no keyAttr specified var self = this; var handleFetchByIdentity = function(item, priorityChange){ if(item){ if(self.store.isItemLoaded(item)){ self._callbackSetLabel([item], undefined, priorityChange); }else{ self.store.loadItem({ item: item, onItem: function(result, dataObject){ self._callbackSetLabel(result, dataObject, priorityChange); } }); } }else{ self._isvalid = false; // prevent errors from Tooltip not being created yet self.validate(false); } }; this.store.fetchItemByIdentity({ identity: value, onItem: function(item){ handleFetchByIdentity(item, priorityChange); } }); }, _setValueFromItem: function(/*item*/ item, /*Boolean?*/ priorityChange){ // summary: // Set the displayed valued in the input box, and the hidden value // that gets submitted, based on a dojo.data store item. // description: // Users shouldn't call this function; they should be calling // attr('displayedValue', value) or attr('value', ...) instead // tags: // private this._isvalid = true; this.item = item; // Fix #6381 this._setValue( this.store.getIdentity(item), this.labelFunc(item, this.store), priorityChange); }, labelFunc: function(/*item*/ item, /*dojo.data.store*/ store){ // summary: // Computes the label to display based on the dojo.data store item. // returns: // The label that the ComboBox should display // tags: // private return store.getValue(item, this.searchAttr); }, _doSelect: function(/*Event*/ tgt){ // summary: // Overrides ComboBox._doSelect(), the method called when an item in the menu is selected. // description: // FilteringSelect overrides this to set both the visible and // hidden value from the information stored in the menu. this._setValueFromItem(tgt.item, true); }, _setDisplayedValueAttr: function(/*String*/ label, /*Boolean?*/ priorityChange){ // summary: // Hook so attr('displayedValue', label) works. // description: // Sets textbox to display label. Also performs reverse lookup // to set the hidden value. // When this is called during initialization it'll ping the datastore // for reverse lookup, and when that completes (after an XHR request) // will call setValueAttr()... but that shouldn't trigger an onChange() // event, even when it happens after creation has finished if(!this._created){ priorityChange = false; } if(this.store){ var query = dojo.clone(this.query); // #6196: populate query with user-specifics // escape meta characters of dojo.data.util.filter.patternToRegExp(). this._lastQuery = query[this.searchAttr] = label.replace(/([\\\*\?])/g, "\\$1"); // if the label is not valid, the callback will never set it, // so the last valid value will get the warning textbox set the // textbox value now so that the impending warning will make // sense to the user this.textbox.value = label; this._lastDisplayedValue = label; var _this = this; var fetch = { query: query, queryOptions: { ignoreCase: this.ignoreCase, deep: true }, onComplete: function(result, dataObject){ dojo.hitch(_this, "_callbackSetLabel")(result, dataObject, priorityChange); }, onError: function(errText){ console.error('dijit.form.FilteringSelect: ' + errText); dojo.hitch(_this, "_setValue")("", label, false); } }; dojo.mixin(fetch, this.fetchProperties); this.store.fetch(fetch); }";s:7:"summary";s:44:"Hook so attr('displayedValue', label) works.";s:7:"returns";s:5:"#5974";s:7:"private";b:1;}s:46:"dijit.form.FilteringSelect.postMixInProperties";a:4:{s:9:"prototype";s:26:"dijit.form.FilteringSelect";s:4:"type";s:8:"Function";s:6:"source";s:64:" this.inherited(arguments); this._isvalid = !this.required;";s:7:"summary";s:0:"";}s:31:"dijit.form.FilteringSelect.undo";a:4:{s:9:"prototype";s:26:"dijit.form.FilteringSelect";s:4:"type";s:8:"Function";s:6:"source";s:57:" this.attr('displayedValue', this._lastDisplayedValue);";s:7:"summary";s:0:"";}s:42:"dijit.form.FilteringSelect.valueNode.value";a:2:{s:8:"instance";s:26:"dijit.form.FilteringSelect";s:7:"summary";s:0:"";}s:31:"dijit.form.FilteringSelect.item";a:2:{s:8:"instance";s:26:"dijit.form.FilteringSelect";s:7:"summary";s:0:"";}s:37:"dijit.form.FilteringSelect._lastQuery";a:3:{s:8:"instance";s:26:"dijit.form.FilteringSelect";s:7:"private";b:1;s:7:"summary";s:0:"";}s:40:"dijit.form.FilteringSelect.textbox.value";a:2:{s:8:"instance";s:26:"dijit.form.FilteringSelect";s:7:"summary";s:0:"";}s:5:"fetch";a:2:{s:6:"mixins";a:1:{s:6:"normal";a:1:{i:0;s:20:"this.fetchProperties";}}s:7:"summary";s:0:"";}s:10:"dijit.form";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dijit";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}