src/aria/widgets/controllers/AutoCompleteController.js
function (value) {
                var report = new ariaWidgetsControllersReportsDropDownControllerReport(), dataModel = this._dataModel;
                if (value == null) {
                    // can be null either because it bound to null or because a request is in progress
                    dataModel.text = (this._pendingRequestNb > 0 && dataModel.text) ? dataModel.text : "";
                    dataModel.value = null;
                    report.ok = true;
                } else if (value && !typeUtil.isString(value)) {
                    if (ariaCoreJsonValidator.check(value, this._resourcesHandler.SUGGESTION_BEAN)) {
                        var text = this._getLabelFromSuggestion(value);
                        dataModel.text = text;
                        dataModel.value = value;
                        report.ok = true;
                    } else {
                        dataModel.value = null;
                        report.ok = false;
                        this.$logError("Value does not match definition for this autocomplete: "
                                + this._resourcesHandler.SUGGESTION_BEAN, [], value);
                    }
                } else {
                    if (typeUtil.isString(value)) {
                        dataModel.text = value;
                    }
                    if (!this.freeText) {
                        report.ok = false;
                        dataModel.value = null;
                    } else {
                        report.ok = true;
                        dataModel.value = value;
                    }
                }
                report.value = dataModel.value;
                report.text = dataModel.text;
                return report;
            }
function (value) {
                var report = new ariaWidgetsControllersReportsDropDownControllerReport(), dataModel = this._dataModel;
                if (value == null) {
                    // can be null either because it bound to null or because a request is in progress
                    dataModel.text = (this._pendingRequestNb > 0 && dataModel.text) ? dataModel.text : "";
                    dataModel.value = null;
                    report.ok = true;
                } else if (value && !typeUtil.isString(value)) {
                    if (ariaCoreJsonValidator.check(value, this._resourcesHandler.SUGGESTION_BEAN)) {
                        var text = this._getLabelFromSuggestion(value);
                        dataModel.text = text;
                        dataModel.value = value;
                        report.ok = true;
                    } else {
                        dataModel.value = null;
                        report.ok = false;
                        this.$logError("Value does not match definition for this autocomplete: "
                                + this._resourcesHandler.SUGGESTION_BEAN, [], value);
                    }
                } else {
                    if (typeUtil.isString(value)) {
                        dataModel.text = value;
                    }
                    if (!this.freeText) {
                        report.ok = false;
                        dataModel.value = null;
                    } else {
                        report.ok = true;
                        dataModel.value = value;
                    }
                }
                report.value = dataModel.value;
                report.text = dataModel.text;
                return report;
            }
function ( value ) { var report = new ariaWidgetsControllersReportsDropDownControllerReport ( ) , dataModel = this . _dataModel ; if ( value == null ) { // can be null either because it bound to null or because a request is in progress dataModel . text = ( this . _pendingRequestNb > 0 && dataModel . text ) ? dataModel . text : "" ; dataModel . value = null ; report . ok = true ; } else if ( value && ! typeUtil . isString ( value ) ) { if ( ariaCoreJsonValidator . check ( value , this . _resourcesHandler . SUGGESTION_BEAN ) ) { var text = this . _getLabelFromSuggestion ( value ) ; dataModel . text = text ; dataModel . value = value ; report . ok = true ; } else { dataModel . value = null ; report . ok = false ; this . $logError ( "Value does not match definition for this autocomplete: " + this . _resourcesHandler . SUGGESTION_BEAN , [ ] , value ) ; } } else { if ( typeUtil . isString ( value ) ) { dataModel . text = value ; } if ( ! this . freeText ) { report . ok = false ; dataModel . value = null ; } else { report . ok = true ; dataModel . value = value ; } } report . value = dataModel . value ; report . text = dataModel . text ; return report ; }
OVERRIDE Verify a given value
@param {Object} value
@return {aria.widgets.controllers.reports.DropDownControllerReport}
@override
OVERRIDE Verify a given value