Prepare the drop down list
@param {String} displayValue
@param {Boolean} currentlyOpen
@return {aria.widgets.controllers.reports.DropDownControllerReport}
979190
function (displayValue, currentlyOpen) {

            var dataModel = this._dataModel, options = dataModel.listContent, selectedValues = dataModel.selectedValues;
            dataModel.selectedIdx = -1; // reset selected indexes
            // retrieve selection from input
            selectedValues = this._parseInputString(options, displayValue);
            if (!currentlyOpen) {
                // update list and datamodel
                if (!ariaUtilsJson.equals(selectedValues, dataModel.value)) {
                    ariaUtilsJson.setValue(dataModel, 'selectedValues', selectedValues);
                    dataModel.value = selectedValues;
                    dataModel.text = this._getDisplayValue(selectedValues);
                }
            }

            var report = new ariaWidgetsControllersReportsDropDownControllerReport();
            report.displayDropDown = options.length > 0 && !currentlyOpen;

            if (report.displayDropDown) {
                // save initial input
                dataModel.initialInput = displayValue;
                // update list of options
                ariaUtilsJson.setValue(dataModel, 'listContent', options);
            }

            report.text = dataModel.text;
            report.value = this._getValue(dataModel.text, dataModel.value);
            if (!selectedValues.length) {
                dataModel.selectedIdx = null;
            }
            return report;
        }
725500
function () {
            var left = this._savedX1, right = this._savedX2;

            var first = Math.max(left / this._railWidth, 0);
            var second = Math.min((right - this._firstWidth) / this._railWidth, 1);

            if (this.value[0] !== first || this.value[1] !== second) {
                this.value = [first, second];
                var binding = this._binding;
                ariaUtilsJson.setValue(binding.inside, binding.to, this.value);
            } else {
                // Trying to go somewhere far, don't update value, but only the display
                this._notifyDataChange();
            }
            return;
        }
1206177
function populate_dropdown (query, results) {
          // exclude current tokens if configured
          results = excludeCurrent(results);

          if(results && results.length) {
              dropdown.empty();
              var dropdown_ul = $("<ul/>")
                  .appendTo(dropdown)
                  .mouseover(function (event) {
                      select_dropdown_item($(event.target).closest("li"));
                  })
                  .mousedown(function (event) {
                      add_token($(event.target).closest("li").data("tokeninput"));
                      hidden_input.change();
                      return false;
                  })
                  .hide();

              if ($(input).data("settings").resultsLimit && results.length > $(input).data("settings").resultsLimit) {
                  results = results.slice(0, $(input).data("settings").resultsLimit);
              }

              $.each(results, function(index, value) {
                  var this_li = $(input).data("settings").resultsFormatter(value);

                  this_li = find_value_and_highlight_term(this_li ,value[$(input).data("settings").propertyToSearch], query);
                  this_li = $(this_li).appendTo(dropdown_ul);

                  if(index % 2) {
                      this_li.addClass($(input).data("settings").classes.dropdownItem);
                  } else {
                      this_li.addClass($(input).data("settings").classes.dropdownItem2);
                  }

                  if(index === 0 && $(input).data("settings").autoSelectFirstResult) {
                      select_dropdown_item(this_li);
                  }

                  $.data(this_li.get(0), "tokeninput", value);
              });

              show_dropdown();

              if($(input).data("settings").animateDropdown) {
                  dropdown_ul.slideDown("fast");
              } else {
                  dropdown_ul.show();
              }
          } else {
              if($(input).data("settings").noResultsText) {
                  dropdown.html("<p>" + escapeHTML($(input).data("settings").noResultsText) + "</p>");
                  show_dropdown();
              }
          }
      }
388950
function () {
            this.navigationInterceptor.destroyElements();
            this.navigationInterceptor = null;

            if (this._cfg.waiAria) {
                var dropDownIcon = this._getDropdownIcon();
                if (dropDownIcon) {
                    dropDownIcon.setAttribute("aria-expanded", "false");
                }
            }

            this._setPopupOpenProperty(false);
            this.controller.setListWidget(null);
            var report = null;

            // Check _toggleDropdown already triggered
            if (!this._hasFocus) {
                // Added to keep the behaviour similar to click on close button click PTR 04661445
                report = this.controller.toggleDropdown(this.getTextInputField().value, this._dropdownPopup != null);
                // to reset the dropdown display
                report.displayDropDown = false;
            }

            this.$DropDownTextInput._afterDropdownClose.call(this);

            if (report) {
                this._reactToControllerReport(report, {
                    hasFocus : false
                });
                // note that _reactToControllerReport might destroy the widget (this._cfg may be null here)
            }

            this._dropDownOpen = false;
            this.refreshPopup = false;
            this._keepFocus = false;
        }
333934
function (charCode, keyCode, currentText, caretPosStart, caretPosEnd, event) {
            var dataModel = this._dataModel, domEvent = ariaDomEvent, report, selectionKey;

            if (this._listWidget) {
                selectionKey = this.checkSelectionKeys(event);
            }
            if (!domEvent.isNavigationKey(keyCode) && !selectionKey) {
                // value that should be in the input after this keystroke and also the caret positions
                var nextValueObject;
                var isDelKey = (keyCode == domEvent.KC_DELETE || keyCode == domEvent.KC_BACKSPACE);
                if (isDelKey) {
                    nextValueObject = this._getTypedValueOnDelete(keyCode, currentText, caretPosStart, caretPosEnd);
                } else {
                    nextValueObject = this._getTypedValue(charCode, currentText, caretPosStart, caretPosEnd);
                }

                dataModel.initialInput = nextValueObject.nextValue;

                return this._checkInputKey(charCode, keyCode, nextValueObject.nextValue, nextValueObject.caretPosStart, nextValueObject.caretPosEnd);
            }

            // Handling for navigation. First if dropdown list is opened
            if (this._listWidget) {
                if (!selectionKey && keyCode == domEvent.KC_ESCAPE) {
                    report = this.checkText(dataModel.initialInput);
                    if (!report) {
                        report = new ariaWidgetsControllersReportsDropDownControllerReport();
                    }
                    report.displayDropDown = false; // close the dropdown
                    report.text = dataModel.initialInput;
                    // data Model value reset on escape to retain error no escape PTR 05163905
                    report.value = report.text;
                    report.cancelKeyStroke = true;
                    dataModel.value = null;
                    return report;

                } else if (selectionKey || keyCode == domEvent.KC_TAB) {
                    if (dataModel.selectedIdx != -1) {
                        if (dataModel.selectedIdx != null) {
                            dataModel.text = this._getLabelFromListValue(dataModel.listContent[dataModel.selectedIdx]);
                            dataModel.value = dataModel.listContent[dataModel.selectedIdx].value;
                        }
                        report = this.checkDropdownValue(dataModel.value);
                    } else {
                        var report = new ariaWidgetsControllersReportsDropDownControllerReport();
                    }
                    report.displayDropDown = false; // close the dropdown
                    if (keyCode != domEvent.KC_TAB) {
                        report.cancelKeyStroke = true; // prevent fieldset onSubmit when typing ENTER
                    }
                    return report;
                } else if (keyCode == domEvent.KC_ARROW_LEFT) {
                    return;
                } else {
                    report = new ariaWidgetsControllersReportsDropDownControllerReport();

                    var oldIdx = dataModel.selectedIdx;
                    this._listWidget.sendKey(0, keyCode);
                    var newIdx = dataModel.selectedIdx;
                    if (oldIdx != newIdx) {
                        report.ok = true;
                        if (newIdx == -1) {
                            dataModel.value = null;
                            dataModel.text = dataModel.initialInput;
                        } else {
                            dataModel.value = dataModel.listContent[newIdx].value;
                            dataModel.text = this._getLabelFromListValue(dataModel.listContent[newIdx]);
                        }
                        report.text = dataModel.text;
                    }
                    return report;
                }
            } else {
                // otherwise open list dropdown on arrow down if needed
                if (keyCode == domEvent.KC_ARROW_DOWN) {
                    report = this._checkInputKey(charCode, keyCode, currentText, caretPosStart, caretPosEnd);
                } else {
                    report = new ariaWidgetsControllersReportsDropDownControllerReport();
                }
                // domEvent.KC_ESCAPE for issue#697 on FF
                if (report && keyCode != domEvent.KC_TAB && keyCode != domEvent.KC_ARROW_DOWN) {
                    // domEvent.KC_ESCAPE for issue#697 on FF
                    report.cancelKeyStrokeDefaultBehavior = (keyCode == domEvent.KC_ESCAPE);
                }
                return report;
            }
        }
1288453
function (propertyName, newValue, oldValue) {
            if (propertyName === 'value') {
                this._checkValue();// checks the value changed in the data model is a valid value from the select
                // options
                if (this.controller) {
                    var report = this.controller.checkValue(newValue);
                    this._reactToControllerReport(report, {
                        stopValueProp : true
                    });
                } else {
                    this._selectValue(newValue);
                }
            } else if (propertyName === 'mandatory') {
                this._updateState();
            } else if (propertyName === 'readOnly' || propertyName === 'disabled') {
                var selectField = this.getSelectField();
                var disabledOrReadonly = this.getProperty("disabled") || this.getProperty("readOnly");
                if (this._skinObj.simpleHTML) {
                    selectField.disabled = disabledOrReadonly ? "disabled" : "";
                }
                var tabIndex = disabledOrReadonly ? -1 : this._calculateTabIndex();
                selectField.tabIndex = tabIndex;
                this._updateState();
            } else if (propertyName === 'options') {
                if (this.controller) {
                    var selectValue = this.controller.getDataModel().value;
                    this.controller.setListOptions(newValue);
                    var report = this.controller.checkValue(selectValue);
                    this._reactToControllerReport(report, {
                        stopValueProp : false
                    });
                } else {
                    // markup for the options
                    var optionsMarkup = [];
                    var stringUtils = ariaUtilsString;
                    for (var i = 0, l = newValue.length; i < l; i++) {
                        // string cast, otherwise encoding will fail
                        var optValue = '' + newValue[i].value;
                        optionsMarkup.push('<option value="', stringUtils.encodeForQuotedHTMLAttribute(optValue), '">', stringUtils.escapeHTML(newValue[i].label), '</option>');
                    }

                    var selectField = this.getSelectField();
                    var currentValue = selectField.value;
                    // update the options list
                    var optionsListString = optionsMarkup.join('');
                    if (ariaCoreBrowser.isIE9 || ariaCoreBrowser.isIE8 || ariaCoreBrowser.isIE7) {
                        // innerHTML replacing in IE truncates the first element and breaks the whole select...
                        selectField.innerHTML = '';
                        var helperDiv = Aria.$window.document.createElement('div');
                        helperDiv.innerHTML = '<select>' + optionsListString + '</select>';
                        var options = helperDiv.children[0].children;
                        while (options.length) {
                            selectField.appendChild(options[0]);
                        }
                    } else {
                        selectField.innerHTML = optionsListString;
                    }
                    this._selectValue(currentValue);
                }

            } else if (propertyName === 'formatError' || propertyName === 'formatErrorMessages'
                    || propertyName === 'error' || propertyName === 'errorMessages') {
                this._cfg[propertyName] = newValue;
                this._updateState();
            } else {
                this.$DropDownInput._onBoundPropertyChange.apply(this, arguments);
            }
        }
813161
function _getPropValue(element, propName) {
    var propValue = '';
    if (element.currentStyle) {
        //IE
        propValue = element.currentStyle[propName];
    } else if (document.defaultView && document.defaultView.getComputedStyle) {
        //Others
        propValue = document.defaultView.getComputedStyle(element, null).getPropertyValue(propName);
    }

    //Prevent exception in IE
    if (propValue && propValue.toLowerCase) {
        return propValue.toLowerCase();
    } else {
        return propValue;
    }
}
1138894
private function tryParseAttribute($displayValue, IItem $item)
    {
        $parsedValue = $item->parseAttribute($displayValue);
        if (isset($parsedValue['text'])) {
            return $parsedValue['text'];
        }

        return $item->get($displayValue);
    }
666679
function (newValues) {
            var arrayUtil = ariaUtilsArray;

            this._stopUpdates();
            var newlySelectedIndexes = [];
            var newlyUnselectedIndexes = [];

            // Loop through all of the items and update the selection status for each item,
            // depending on the new array of selected values
            var selectedIndex = -1;
            var data = this._data;
            var items = data.items;
            var maxSelectedCount = this._getTrueMaxSelectedCount(items);
            var selectedCount = 0;
            for (var idx = 0, length = items.length; idx < length; idx++) {
                var item = items[idx];
                var selected = arrayUtil.contains(newValues, item.value);
                if (selected) {
                    if (selectedCount == maxSelectedCount) {
                        // cancel selection when there is more than what is allowed
                        selected = false;
                    } else if (selectedIndex == -1) {
                        selectedCount = 1;
                        selectedIndex = idx;
                    } else {
                        selectedCount++;
                        selectedIndex = null;
                    }
                }
                if (data.preselect === "none" || item.selected != selected) {
                    // selection has changed
                    (selected ? newlySelectedIndexes : newlyUnselectedIndexes).push(idx);
                    this.json.setValue(items[idx], "selected", selected);
                }
            }
            this.json.setValue(data, "selectedIndex", selectedIndex);
            this.json.setValue(data, "selectedCount", selectedCount);

            // James removed this because if more than one item is selected, data. selectedIndex is set to null.
            // Also, in the case of the multi-select we don't necessarily
            // Want to focus a selected item - need to check this on the list.
            // this.json.setValue(data, "focusIndex", selectedIndex);
            // this.setFocus(data.focusIndex);

            this._updateCurrentlyDisabled(items);
            this._resumeUpdates();
            if (newlySelectedIndexes.length > 0 || newlyUnselectedIndexes.length > 0) {
                this._raiseOnChangeEvent(newlySelectedIndexes, newlyUnselectedIndexes);
            }
        }
739494
function (value) {
            if (value && this.controller && this.controller.getDisplayTextFromValue) {
                return this.controller.getDisplayTextFromValue(this._cfg.prefill);
            } else {
                return value;
            }
        }
352036
function () {
            this.$DropDownListTrait._afterDropdownOpen.apply(this, arguments);
            if (this._cfg.waiAria) {
                var field = this.getTextInputField();
                var listWidget = this.controller.getListWidget();
                field.setAttribute("aria-owns", listWidget.getListDomId());
                var dropDownIcon = this._getDropdownIcon();
                if (dropDownIcon) {
                    dropDownIcon.setAttribute("aria-expanded", "true");
                }
                listWidget.afterWidgetLoaded({
                    fn: this._updateAriaActiveDescendant,
                    scope: this
                });
            }
        }
630068
function () {
            if (this._cfg.waiAria) {
                var field = this.getTextInputField();
                field.removeAttribute("aria-owns");

                var dropDownIcon = this._getDropdownIcon();
                if (dropDownIcon) {
                    dropDownIcon.setAttribute("aria-expanded", "false");
                }
           }
            this.$DropDownListTrait._afterDropdownClose.apply(this, arguments);
        }
733316
private void displayValue() {

        if (m_currentValue == null) {
            m_picker.displayValue("");
            m_picker.setPreviewVisible(false);
            m_picker.setLocationInfo(Collections.<String, String> emptyMap());
        } else {
            m_picker.displayValue(m_editValue.getAddress());
            Map<String, String> infos = new LinkedHashMap<String, String>();
            if (hasLatLng()) {
                infos.put(Messages.get().key(Messages.GUI_LOCATION_LATITUDE_0), m_editValue.getLatitudeString());
                infos.put(Messages.get().key(Messages.GUI_LOCATION_LONGITUDE_0), m_editValue.getLongitudeString());
                infos.put(Messages.get().key(Messages.GUI_LOCATION_ZOOM_0), String.valueOf(m_editValue.getZoom()));
            }
            if (hasSize()) {
                infos.put(
                    Messages.get().key(Messages.GUI_LOCATION_SIZE_0),
                    m_editValue.getWidth() + " x " + m_editValue.getHeight());
            }
            if (hasType()) {
                infos.put(Messages.get().key(Messages.GUI_LOCATION_TYPE_0), m_editValue.getType());
            }
            if (hasMode()) {
                infos.put(Messages.get().key(Messages.GUI_LOCATION_MODE_0), m_editValue.getMode());
            }
            m_picker.setLocationInfo(infos);
            m_picker.setPreviewVisible(true);
            if (!isApiLoaded()) {

                onApiReady(new Command() {

                    public void execute() {

                        return;
                    }
                });
            }
        }
    }
311322
def web_display=(new_val)
      return nil if @web_display == new_val
      raise JSS::InvalidDataError, "inventory_display must be a string, one of: #{INVENTORY_DISPLAY_CHOICES.join(', ')}" unless WEB_DISPLAY_CHOICES.include? new_val
      @web_display = new_val
      @need_to_update = true
    end
758865
function select (index) {
    // force form to update state for validation
    $mdUtil.nextTick(function () {
      getDisplayValue(ctrl.matches[ index ]).then(function (val) {
        var ngModel = elements.$.input.controller('ngModel');
        $mdLiveAnnouncer.announce(val + ' ' + ctrl.selectedMessage, 'assertive');
        ngModel.$setViewValue(val);
        ngModel.$render();
      }).finally(function () {
        $scope.selectedItem = ctrl.matches[ index ];
        setLoading(false);
      });
    }, false);
  }
164183
public function display()
    {
        if (!$this->visible) {
            return;
        }

        parent::display();

        $flydown = $this->getCompositeWidget('action_flydown');
        foreach ($this->action_items as $item) {
            if ($item->visible) {
                if ($item instanceof SwatActionItemDivider) {
                    $flydown->addDivider();
                } else {
                    $flydown->addOption($item->id, $item->title);
                }
            }
        }

        // set the flydown back to its initial state (no persistence). The
        // flydown is never reset if there is a selected item and the selected
        // items has a widget with one or more messages.
        if (
            $this->auto_reset &&
            ($this->selected === null ||
                $this->selected->widget === null ||
                !$this->selected->widget->hasMessage())
        ) {
            $flydown->reset();
        }

        // select the current action item based upon the flydown value
        if (isset($this->action_items_by_id[$flydown->value])) {
            $this->selected = $this->action_items_by_id[$flydown->value];
        } else {
            $this->selected = null;
        }

        $div_tag = new SwatHtmlTag('div');
        $div_tag->id = $this->id;
        $div_tag->class = $this->getCSSClassString();
        $div_tag->open();

        echo '<div class="swat-actions-controls">';

        $label = new SwatHtmlTag('label');
        $label->for = $flydown->getFocusableHtmlId();
        $label->setContent(Swat::_('Action: '));
        $label->display();

        $flydown->display();
        echo ' ';
        $this->displayButton();

        echo '</div>';

        foreach ($this->action_items as $item) {
            if ($item->widget !== null) {
                $div = new SwatHtmlTag('div');

                $div->class =
                    $item == $this->selected ? 'swat-visible' : 'swat-hidden';

                $div->id = $this->id . '_' . $item->id;

                $div->open();
                $item->display();
                $div->close();
            }
        }

        echo '<div class="swat-actions-note">';
        echo Swat::_('Actions apply to checked items.');
        echo '</div>';

        $div_tag->close();

        Swat::displayInlineJavaScript($this->getInlineJavaScript());
    }
1166714
function setValueDisplay() {
      var value = self.get().toFixed(self.precision);
      $value.set('value', value);
      $valuePad.set('innerHTML', value);
    }