Create a report containing the current display value.
@return {aria.widgets.controllers.reports.DropDownControllerReport}
@protected
341497
function (includeValue) {
                var dataModel = this._dataModel;
                var report = new ariaWidgetsControllersReportsDropDownControllerReport();
                report.ok = true;
                if (includeValue) {
                    report.value = dataModel.value;
                }
                report.text = dataModel.displayText;
                return report;
            }
40122
function (includeController) {
            var hasChanged = null;
            if (this._skinObj.simpleHTML) {
                hasChanged = this.setProperty("value", this.getSelectField().value);
            } else if (includeController) {
                var controller = this.controller;
                var dataModel = controller.getDataModel();
                hasChanged = this.setProperty("value", dataModel.value);
            }

            // PTR05634154: setProperty can dispose the widget
            // (that's why we are checking this._cfg)
            if (this._cfg) {
                if (hasChanged != null) {
                    this.changeProperty("error", false);
                    if (!(this._cfg.formatError && this._cfg.formatErrorMessages.length)
                            || (this._cfg.error && this._cfg.errorMessages.length)) {
                        this._validationPopupHide();
                    }
                    if (this._cfg.onchange) {
                        this.evalCallback(this._cfg.onchange);
                    }
                }
            }
        }
173663
function (out) {
            var cfg = this._cfg;

            var dm = this.controller.getDataModel();

            var calendarConf = {
                block : true,
                startDate : dm.jsDate,
                tabIndex : -1,
                label : cfg.calendarLabel,
                defaultTemplate : cfg.calendarTemplate,
                waiAria: cfg.waiAria,
                waiAriaDateFormat: cfg.waiAriaDateFormat,
                waiAriaLabel: cfg.waiAriaCalendarLabel,
                minValue : cfg.minValue,
                maxValue : cfg.maxValue,
                onclick : {
                    fn : this._clickOnDate,
                    scope : this
                },
                onkeydown : {
                    fn: this._calendar_onkeydown,
                    scope : this
                },
                onmousedown : {
                    fn: this._calendar_onmousedown,
                    scope: this
                },
                onfocus : {
                    fn: this._calendar_onfocus,
                    scope: this
                },
                onblur : {
                    fn: this._calendar_onblur,
                    scope: this
                },
                bind : {
                    "value" : {
                        to : "calendarValue",
                        inside : dm
                    }
                }
            };

            // maps property from datepicker configuration
            var propMapped = ['displayUnit', 'numberOfUnits', 'firstDayOfWeek', 'monthLabelFormat',
                    'dayOfWeekLabelFormat', 'dateLabelFormat', 'completeDateLabelFormat', 'showWeekNumbers',
                    'showShortcuts', 'restrainedNavigation', 'sclass'];
            for (var i = 0, property; property = propMapped[i]; i++) {
                this._applyCalendarCfg(property, calendarConf);
            }

            var calendar = new ariaWidgetsCalendarCalendar(calendarConf, this._context, this._lineNumber);
            calendar.$on({
                'widgetContentReady' : this._refreshPopup,
                scope : this
            });
            this.controller.setCalendar(calendar);
            out.registerBehavior(calendar);
            calendar.writeMarkup(out);
        }
408272
function () {
			var value = this.ctrl.editor.getPlainValue();
			var cloned = JSON.parse(JSON.stringify(value));
			delete cloned[this.ctrl.store.idProperty];
			var template = value[this.ctrl.store.typeProperty];
			topic.publish("/new",{store:this.ctrl.store.name,schemaUrl:template,value:cloned});
		}
907386
function (report, arg) {
            // a null report means callback was asynchronous
            // PROFILING // var profilingId = this.$startMeasure("react to controller report (DropDownTextInput)");
            if (report) {
                var openDropdown = report.displayDropDown;
                var repositionDropDown = report.repositionDropDown;
                this.$TextInput._reactToControllerReport.call(this, report, arg);
                // check that widget has not been disposed
                if (this._cfg) {
                    if (openDropdown === true && !this._dropdownPopup) {
                        this._openDropdown();
                    } else if (openDropdown === false && this._dropdownPopup) {
                        this._closeDropdown();
                    } else if (repositionDropDown && this._dropdownPopup) {
                        this._reopenDropdown();
                        // Note: an alternative here would be to call this._dropdownPopup.updatePosition()
                        // instead of closing and re-opening the popup. This would avoid loosing
                        // the current scrolling position in some cases, but, it could perhaps introduce
                        // some regressions in other cases.
                    }
                }
            }
            // PROFILING // this.$stopMeasure(profilingId);
        }
763575
private ChartPanel createChartPanel(final ValueCountingAnalyzerResult result) {
        if (_valueCounts.size() > ChartUtils.CATEGORY_COUNT_DISPLAY_THRESHOLD) {
            logger.info("Display threshold of {} in chart surpassed (got {}). Skipping chart.",
                    ChartUtils.CATEGORY_COUNT_DISPLAY_THRESHOLD, _valueCounts.size());
            return null;
        }

        final Integer distinctCount = result.getDistinctCount();
        final Integer unexpectedValueCount = result.getUnexpectedValueCount();
        final int totalCount = result.getTotalCount();

        // chart for display of the dataset
        final String title = "Value distribution of " + _groupOrColumnName;
        final JFreeChart chart = ChartFactory
                .createBarChart(title, "Value", "Count", _dataset, PlotOrientation.HORIZONTAL, true, true, false);

        final List<Title> titles = new ArrayList<>();
        titles.add(new ShortTextTitle("Total count: " + totalCount));
        if (distinctCount != null) {
            titles.add(new ShortTextTitle("Distinct count: " + distinctCount));
        }
        if (unexpectedValueCount != null) {
            titles.add(new ShortTextTitle("Unexpected value count: " + unexpectedValueCount));
        }
        chart.setSubtitles(titles);

        ChartUtils.applyStyles(chart);

        // code-block for tweaking style and coloring of chart
        {
            final CategoryPlot plot = (CategoryPlot) chart.getPlot();
            plot.getDomainAxis().setVisible(false);

            int colorIndex = 0;
            for (int i = 0; i < getDataSetItemCount(); i++) {
                final String key = getDataSetKey(i);
                final Color color;
                final String upperCaseKey = key.toUpperCase();
                if (_valueColorMap.containsKey(upperCaseKey)) {
                    color = _valueColorMap.get(upperCaseKey);
                } else {
                    if (i == getDataSetItemCount() - 1) {
                        // the last color should not be the same as the first
                        if (colorIndex == 0) {
                            colorIndex++;
                        }
                    }

                    Color colorCandidate = SLICE_COLORS[colorIndex];
                    final int darkAmount = i / SLICE_COLORS.length;
                    for (int j = 0; j < darkAmount; j++) {
                        colorCandidate = WidgetUtils.slightlyDarker(colorCandidate);
                    }
                    color = colorCandidate;

                    colorIndex++;
                    if (colorIndex >= SLICE_COLORS.length) {
                        colorIndex = 0;
                    }
                }

                plot.getRenderer().setSeriesPaint(i, color);
            }
        }

        return ChartUtils.createPanel(chart, false);
    }
683528
function (label) {
            var report = this.controller.removeValue(label);
            var removedSuggestion = report.removedSuggestion;
            var removedSuggestionIndex = report.removedSuggestionIndex;
            this._reactToControllerReport(report);
            this._textInputField.style.width = "0px";
            this.__resizeInput();
            return {
                removedSuggestion : removedSuggestion,
                removedSuggestionIndex : removedSuggestionIndex
            };
        }
623049
function (report, arg) {
            // To reset focus if there is no suggestion dropdown
            if (!this.controller._resetFocus) {
                this._keepFocus = false;
            }
            this.$DropDownTextInput._reactToControllerReport.call(this, report, arg);
        }
258369
function (text) {
                var dataModel = this._dataModel;
                var trimText = ariaUtilsString.trim(text);

                if (text !== '' && text !== dataModel.text) {
                    dataModel.text = trimText;
                    this._resourcesHandler.getSuggestions(trimText, {
                        fn : this._suggestionsCallback,
                        scope : this,
                        args : {
                            nextValue : trimText,
                            triggerDropDown : false
                        }
                    });
                    return null;
                }
                var report = new aria.widgets.controllers.reports.DropDownControllerReport();

                if (this.maxOptions && this.selectedSuggestions.length == this.maxOptions) {
                    trimText = "";
                }

                // an empty field is usually not considered as an error
                if (trimText === '') {
                    dataModel.value = null;
                    dataModel.text = '';
                    report.ok = true;
                } else {
                    if (this.freeText) {
                        report.ok = true;
                        var valueToAdd;
                        valueToAdd = dataModel.value || trimText;
                        dataModel.value = null;
                        dataModel.text = '';
                        report.text = "";
                        report.suggestionsToAdd = this._checkNewSuggestions([valueToAdd]);
                    } else if (!dataModel.value) {
                        report.ok = false;
                        report.value = null;
                        report.errorMessages.push(this.res.errors["40020_WIDGET_AUTOCOMPLETE_VALIDATION"]);
                    }
                }
                report.value = this.selectedSuggestions;

                return report;
            }
918213
public function display()
    {
        if (!$this->visible) {
            return;
        }

        parent::display();

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

        // toggle button content is displayed with JavaScript

        if ($this->valid_range_start === null) {
            $today = new SwatDate();
            $value = $today->formatLikeIntl('MM/dd/yyyy');
        } else {
            $value = $this->valid_range_start->formatLikeIntl('MM/dd/yyyy');
        }

        $input_tag = new SwatHtmlTag('input');
        $input_tag->type = 'hidden';
        $input_tag->id = $this->id . '_value';
        $input_tag->name = $this->id . '_value';
        $input_tag->value = $value;
        $input_tag->display();

        $container_div_tag->close();

        Swat::displayInlineJavaScript($this->getInlineJavaScript());
    }
627037
function (out) {

            var cfg = this._cfg;

            var dm = this.controller.getDataModel();

            var list = new ariaWidgetsFormListList({
                defaultTemplate : cfg.listTemplate,
                waiAria : cfg.waiAria,
                tabIndex : -1,
                block : true,
                sclass : cfg.listSclass || this._skinObj.listSclass,
                onchange : {
                    fn : this._clickOnItem,
                    scope : this
                },
                onkeyevent : {
                    fn : this._keyPressed,
                    scope : this

                },
                onclose : {
                    fn : this._toggleDropdown,
                    scope : this
                },
                minWidth : this._inputMarkupWidth + this._skinObj.offsetRight,
                width : (cfg.popupWidth > 0 && cfg.popupWidth > this._inputMarkupWidth) ? cfg.popupWidth : null,
                multipleSelect : true,
                maxHeight : 250,
                activateSort : cfg.activateSort,
                maxOptions : cfg.maxOptions,
                bind : {
                    items : {
                        to : "listContent",
                        inside : dm
                    },
                    selectedIndex : {
                        to : "selectedIdx",
                        inside : dm
                    },
                    selectedValues : {
                        to : "selectedValues",
                        inside : dm
                    }
                },
                numberOfColumns : cfg.numberOfColumns,
                numberOfRows : cfg.numberOfRows,
                displayOptions : cfg.displayOptions
            }, this._context, this._lineNumber);

            out.registerBehavior(list);
            list.writeMarkup(out);
            this.controller.setListWidget(list);
            list.$on({
                'widgetContentReady' : {
                    fn : this._refreshPopup,
                    scope : this,
                    args : {
                        list : list
                    }

                }
            });
            this._dropDownList = list;

        }
1288493
function updateReport() {
				var nodeIndex = getNodeIndex({}, structureJson);
			
				var treeOptions = {
					"plugins" : [ "themes", "json_data", "ui", "cookies", "contextmenu" ],
          "core" : {
            "html_titles" : true
          },
					"cookies" : {
						"save_opened" : $report.attr("id")+"_opened"
					},
					"contextmenu" : {
						"select_node" : true,
						"items" : contextMenuHandler
					},
					"json_data" : {
						"progressive_render" : true,
						"progressive_unload" : true,
						"data" : dataHandler
          }
				};
				$report.jstree(treeOptions)
				.on("loaded.jstree", function(event, data) {
					$cukeTree.cukeTree().reportRendered($report);
				})
				.on("select_node.jstree", function(event, data) {
					var $node = $(data.args[0]);
					$cukeTree.cukeTree().reportNodeSelected({ $report : $report, selected : $node });
				});	
        
        function dataHandler(item, callback) {
          var data = null;
          if (item === -1) {
            data = [getTreeNode("group", structureJson)];
          } else {
            data = getTreeNodeChildren($(item).attr("id"));
          }
          callback(data);
        }
        
        function getTreeNodeChildren(id) {
          var data = [];
          var parent = nodeIndex[id];
          if (parent.children !== undefined) {
            for(var i=0; i<parent.children.length; i++) { data.push(getTreeNode("group", parent.children[i])); }
          }
          if (parent.features !== undefined) {
            for(var i=0; i<parent.features.length; i++) { data.push(getTreeNode("feature", parent.features[i])); }
          }
          if (parent.elements !== undefined) {
            for(var i=0; i<parent.elements.length; i++) { data.push(getTreeNode("scenario", parent.elements[i])); }
          }
          if (parent.steps !== undefined) {
            for(var i=0; i<parent.steps.length; i++) { data.push(getTreeNode("step", parent.steps[i])); }
          }
          return data;
        }
        
        function getTreeNode(type, reportEntry) {
          var cssClasses = "node-"+ reportEntry.result.status;
          cssClasses += " "+ type +" "+ type +"-"+ reportEntry.result.status;
          
          var title = reportEntry.name;
          switch(type) {
            case "group": 
              title += " ("+ getScenarioCount(type, reportEntry) +" scenario(s))"; 
              break;
            case "feature":
              var scenarioCount = reportEntry.elements !== undefined ? reportEntry.elements.length : 0;
              if (reportEntry.profile !== undefined) {
                title += " <span class='profile'>["+ reportEntry.profile +"]</span>";
              }
              title += " ("+ scenarioCount +" scenario(s))"
              break;
            case "scenario":
              for(var i=0; i < (reportEntry.tags !== undefined ? reportEntry.tags.length : 0); i++) {
                title += " <span class='scenario-tag'>"+ reportEntry.tags[i].name +"</span>";
              }
              break;
            case "step":
              title = '<span class="keyword">'+ reportEntry.keyword +'</span>'+ title;
              break;
          }
          
          var addingChildren = reportEntry.result && reportEntry.result.status == "failed";
                  
          var node = {
            attr : { 
              id : reportEntry.nodeId,
              "data-type" : type, 
              class : cssClasses
            },
            state : addingChildren && type !== "step" ? "open" : "closed",
            data : {
              attr : { 
                href : "javascript:;", 
                "data-path" : reportEntry.uri
              },
              title : title,
              icon : type
            }
          };
          
          if (addingChildren) {
            node.children = getTreeNodeChildren(reportEntry.nodeId);
          }
          
          if (reportEntry.result.error_message !== undefined) {
            node.attr["data-error"] = reportEntry.result.error_message;
          }
          
          if (reportEntry.embeddings !== undefined) {
            node.attr["data-embedding-mime-type"] = reportEntry.embeddings[0].mime_type;
            node.attr["data-embedding-data"] = reportEntry.embeddings[0].data;
          }
          
          return node;
        }
			}
424
function () {
    this.events.on('report:run:browser', this.runBrowser.bind(this));
    this.events.on('report:assertion', this.assertion.bind(this));
    this.events.on('report:test:started', this.testStarted.bind(this));
    this.events.on('report:test:finished', this.testFinished.bind(this));
    this.events.on('report:runner:finished', this.runnerFinished.bind(this));
    this.events.on('report:testsuite:started', this.testsuiteStarted.bind(this));
    //this.events.on('report:testsuite:finished', this.testsuiteFinished.bind(this));
    return this;
  }
651469
function (text) {

                var dataModel = this._dataModel;

                if (text !== '' && text !== dataModel.text) {
                    dataModel.text = text;

                    this._pendingRequestNb += 1;
                    this._resourcesHandler.getSuggestions(text, {
                        fn : this._suggestionsCallback,
                        scope : this,
                        args : {
                            nextValue : text,
                            triggerDropDown : false
                        }
                    });

                    // return null as there is asynchrone handling
                    return null;
                }

                // returned object
                var report = new ariaWidgetsControllersReportsDropDownControllerReport();

                // an empty field is usually not considered as an error
                if (text === '') {
                    dataModel.value = null;
                    dataModel.text = '';
                    report.ok = true;
                    report.value = null;
                } else {
                    if (this.freeText) {
                        report.ok = true;
                        if (this._pendingRequestNb > 0 && !dataModel.value) {
                            report.value = dataModel.text;
                        }
                    } else {
                        if (!dataModel.value) {

                            if (this.expandButton && dataModel.listContent && this._checkValueList()) {
                                report.ok = true;
                            } else {
                                report.ok = false;
                                report.value = null;
                                report.errorMessages.push(this.getErrorMessage("validation"));
                            }
                        }

                    }
                    // if there is no value in the dataModel, user was just browsing selections
                    if (dataModel.value) {
                        report.value = dataModel.value;
                    }

                }
                return report;
            }
1099670
function() {

            // Storing the context of the widget
            var self = this,

                dataDisabled,

                optgroupClass,

                optgroupElement,

                iconClass,

                iconUrl,

                iconUrlClass,

                iconUrlStyle,

                // Declaring the variable that will hold all of the dropdown list option elements
                currentItem = "",

                originalElemId = self.originalElemId || "",

                // Creates an unordered list element
                createdList = $("<ul/>", {

                    // Sets the unordered list `id` attribute
                    "id": originalElemId && originalElemId + "SelectBoxItOptions",

                    "class": "selectboxit-options",

                    //Sets the unordered list `tabindex` attribute to -1 to prevent the unordered list from being focusable
                    "tabindex": -1

                }),

                currentDataSelectedText,

                currentDataText,

                currentDataSearch,

                currentText,

                currentOption,

                parent;

            // Checks the `showFirstOption` plugin option to determine if the first dropdown list option should be shown in the options list.
            if (!self.options["showFirstOption"]) {

                // Disables the first select box option
                self.selectItems.first().attr("disabled", "disabled");

                // Excludes the first dropdown list option from the options list
                self.selectItems = self.selectBox.find("option").slice(1);

            }

            // Loops through the original select box options list and copies the text of each
            // into new list item elements of the new dropdown list
            self.selectItems.each(function(index) {

                currentOption = $(this);

                optgroupClass = "";

                optgroupElement = "";

                dataDisabled = currentOption.prop("disabled");

                iconClass = currentOption.attr("data-icon") || "";

                iconUrl = currentOption.attr("data-iconurl") || "";

                iconUrlClass = iconUrl ? "selectboxit-option-icon-url": "";

                iconUrlStyle = iconUrl ? 'style="background-image:url(\'' + iconUrl + '\');"': "";

                currentDataSelectedText = currentOption.attr("data-selectedtext");

                currentDataText = currentOption.attr("data-text");

                currentText = currentDataText ? currentDataText: currentOption.text();

                parent = currentOption.parent();

                // If the current option being traversed is within an optgroup

                if(parent.is("optgroup")) {

                    optgroupClass = "selectboxit-optgroup-option";

                    if(currentOption.index() === 0) {

                         optgroupElement = '<span class="selectboxit-optgroup-header ' + parent.first().attr("class") + '"data-disabled="true">' + parent.first().attr("label") + '</span>';

                    }

                }

                currentOption.attr("value", this.value);

                // Uses string concatenation for speed (applies HTML attribute encoding)
                currentItem += optgroupElement + '<li data-id="' + index + '" data-val="' + self.htmlEscape(this.value) + '" data-disabled="' + dataDisabled + '" class="' + optgroupClass + " selectboxit-option " + ($(this).attr("class") || "") + '"><a class="selectboxit-option-anchor"><span class="selectboxit-option-icon-container"><i class="selectboxit-option-icon ' + iconClass + ' ' + (iconUrlClass || self.theme["container"]) + '"' + iconUrlStyle + '></i></span>' + (self.options["html"] ? currentText: self.htmlEscape(currentText)) + '</a></li>';

                currentDataSearch = currentOption.attr("data-search");

                // Stores all of the original select box options text inside of an array
                // (Used later in the `searchAlgorithm` method)
                self.textArray[index] = dataDisabled ? "": currentDataSearch ? currentDataSearch: currentText;

                // Checks the original select box option for the `selected` attribute
                if (this.selected) {

                    // Replaces the default text with the selected option text
                    self._setText(self.dropdownText, currentDataSelectedText || currentText);

                    //Set the currently selected option
                    self.currentFocus = index;

                }

            });

            // If the `defaultText` option is being used
            if ((self.options["defaultText"] || self.selectBox.attr("data-text"))) {

                var defaultedText = self.options["defaultText"] || self.selectBox.attr("data-text");

                // Overrides the current dropdown default text with the value the user specifies in the `defaultText` option
                self._setText(self.dropdownText, defaultedText);

                self.options["defaultText"] = defaultedText;

            }

            // Append the list item to the unordered list
            createdList.append(currentItem);

            // Stores the dropdown list options list inside of the `list` instance variable
            self.list = createdList;

            // Append the dropdown list options list to the dropdown container element
            self.dropdownContainer.append(self.list);

            // Stores the individual dropdown list options inside of the `listItems` instance variable
            self.listItems = self.list.children("li");

            self.listAnchors = self.list.find("a");

            // Sets the 'selectboxit-option-first' class name on the first drop down option
            self.listItems.first().addClass("selectboxit-option-first");

            // Sets the 'selectboxit-option-last' class name on the last drop down option
            self.listItems.last().addClass("selectboxit-option-last");

            // Set the disabled CSS class for select box options
            self.list.find("li[data-disabled='true']").not(".optgroupHeader").addClass(self.theme["disabled"]);

            self.dropdownImage.addClass(self.selectBox.attr("data-icon") || self.options["defaultIcon"] || self.listItems.eq(self.currentFocus).find("i").attr("class"));

            self.dropdownImage.attr("style", self.listItems.eq(self.currentFocus).find("i").attr("style"));

            //Maintains chainability
            return self;

        }
570812
function () {
            var possibleVals = result(this, 'possibleVals');
            var id = this.inputId;
            var $select = Backbone.$('<' + this.elementType + '>')
                    .attr(extend((this.addId ? { id: id, name: id } : {}), this.inputAttrs));

            this.getInputWrapper().html($select);
            if (this.multiple) { $select.attr('multiple', 'multiple'); }
            if (this.inputClass) { $select.addClass(this.inputClass); }
            if (this.placeholder) {
                $select.append('<option value="">' + this.placeholder + '</option>');
            }
            return this._renderInput($select, possibleVals);
        }
1330725
function () {
            this.$DropDownTextInput._checkCfgConsistency.call(this);
            var opt = this._cfg.options;
            var values = [];
            var dupValues = [];
            var map = {};

            for (var count = 0; count < opt.length; count++) {
                if (map[opt[count].value]) {
                    dupValues.push(opt[count].value);
                } else {
                    map[opt[count].value] = true;
                    values.push(opt[count]);
                }
            }
            if (dupValues.length > 0) {
                this.controller.setListOptions(values);
                this.$logError(this.DUPLICATE_VALUE, [dupValues]);
            }

        }