Lines Matching defs:query

80     QUERY               = 'query',
104 Fires after the query has been completely cleared or no longer meets the
105 minimum query length requirement.
108 @param {String} prevVal Value of the query before it was cleared.
118 value meets the criteria necessary to generate an autocomplete query.
120 @event query
122 textarea that generated the query.
123 @param {String} query AutoComplete query. This is the string that will
134 Fires after query results are received from the source. If no source has
139 @param {String} query Query that generated these results.
194 automatically when user input causes a `query` event to be fired. The only
199 @param {String} [query] Query to send. If specified, the `query` attribute
200 will be set to this query. If not specified, the current value of the
201 `query` attribute will be used.
207 sendRequest: function (query, requestTemplate) {
211 if (query || query === '') {
212 this._set(QUERY, query);
214 query = this.get(QUERY) || '';
223 requestTemplate.call(this, query) : query;
228 query : query,
232 success: Y.bind(this._onResponse, this, query)
312 Creates a DataSource-like object that passes the query to a custom-defined
317 @param {Function} source Function that accepts a query and a callback as
336 if ((value = source(request.query, afterResults))) {
359 var query = request.query;
362 YObject.owns(source, query) ? source[query] : [],
410 @param {String} query Query that generated these results.
415 _parseResponse: function (query, response, data) {
418 query : query,
468 results = filters[i].call(this, query, results.concat());
497 highlighted = highlighter.call(this, query,
518 formatted = formatter.call(this, query, results.concat());
537 Returns the query portion of the specified input value, or `null` if there
538 is no suitable query within the input value.
540 If a query delimiter is defined, the query will be the last delimited part
544 @param {String} value Input value from which to extract the query.
545 @return {String|null} query
613 return function (query) {
614 return Lang.sub(template, {query: encodeURIComponent(query)});
754 Updates the query portion of the `value` attribute.
756 If a query delimiter is defined, the last delimited portion of the input
814 delay, fire, minQueryLength, query;
824 query = self._parseValue(newVal) || '';
826 if (minQueryLength >= 0 && query.length >= minQueryLength) {
827 // Only query on changes that originate from the UI.
834 query : query,
846 // For programmatic value changes, just update the query
847 // attribute without sending a query.
848 self._set(QUERY, query);
873 // If a query delimiter is set and the input's value contains one or
899 Handles `valueChange` events on the input node and fires a `query` event
909 // Don't query if the internal value is the same as the new value
923 _onResponse: function (query, e) {
924 // Ignore stale responses that aren't for the current query.
925 if (query === (this.get(QUERY) || '')) {
926 this._parseResponse(query || '', e.response, e.data);
934 array and `query` to null.
945 Default `query` event handler. Sets the `query` attribute and sends a
953 Y.log('query: "' + e.query + '"; inputValue: "' + e.inputValue + '"', 'info', 'autocomplete-base');
954 this.sendRequest(e.query); // sendRequest will set the 'query' attribute
1013 Node to monitor for changes, which will generate `query` events when
1038 Minimum number of characters that must be entered before a `query` event
1040 effectively disable all `query` events.
1051 Current query, or `null` if there is no current query.
1053 The query might not be the same as the current value of the input node, both
1056 delimited input string will be used as the query value.
1058 @attribute query
1063 query: {
1069 Number of milliseconds to delay after input before triggering a `query`
1088 autocomplete queries and updated when the `query` attribute is
1100 Source request template. This can be a function that accepts a query as a
1102 placeholder "{query}", which will be replaced with the actual URI-encoded
1103 query. In either case, the resulting string will be appended to the request
1108 always be returned as a function that accepts a query argument and returns a
1122 called with two arguments when results are received: the query and an array
1150 filtered: the query and an array of result objects. The formatter is
1170 filtered: the query and an array of filtered result objects. The highlighter
1260 query. This is an easy way to create a fully client-side autocomplete
1278 A function source will be called with the current query and a
1290 function (query) {
1300 function (query, callback) {
1309 An object will be treated as a query hashmap. If a property on the
1310 object matches the current query, the value of that property will be
1378 make a JSONP request. The `{query}` placeholder will be replaced with
1379 the current query, and the `{callback}` placeholder will be replaced
1400 Example: `'http://example.com/search?q={query}&callback={callback}'`
1408 to make a same-origin XHR request. The `{query}` placeholder will be
1409 replaced with the current query. An optional `{maxResults}` placeholder
1430 Example: `'http://example.com/search?q={query}'`
1434 <dt>String (YQL query)</dt>
1437 If a YQL query is provided, it will be used to make a YQL request. The
1438 `{query}` placeholder will be replaced with the current autocomplete
1439 query. This placeholder must appear in the YQL query, or the request
1452 Example: `'select * from search.suggest where query="{query}"'`
1457 As an alternative to providing a source, you could simply listen for `query`