function ColorsSuggestionProvider() {
pAjax.apply(this);
this.controller = null;
this.typeAhead = true;
}
var _p = ColorsSuggestionProvider.prototype = new pAjax;
_p.requestSuggestions = function (oAutoSuggestController, bTypeAhead) {
this.controller = oAutoSuggestController;
this.typeAhead = bTypeAhead;
// Only display suggestions after at least 3 chars in the textbox
if (this.controller.textbox.value.length > 2) {
var req = this.prepare("suggestColors", pAjaxRequest.POST);
req.setParam("text", this.controller.textbox.value);
req.async();
}
}
_p.onLoad = function () { this.controller.autoSuggest(this.getResponse(), this.typeAhead); }
|