Field widget is replaced with "RestrictedSelectWidget" because we not want to use modified widgets for
        filtering.
504329
def get_widget(self, request):
        
        return self._update_widget_choices(self.field.formfield(widget=RestrictedSelectWidget).widget)
363504
def exclude(self, twig=None, check_visible=True, **kwargs):
        
        return self - self.filter(twig=twig,
                                  check_visible=check_visible,
                                  **kwargs)
743997
function (skipChangeState) {
            var state = "normal";
            var cfg = this._cfg;
            if (cfg.disabled) {
                state = "disabled";
            } else {
                if ((this._mousePressed && this._mouseOver) || this._keyPressed) {
                    state = "msdown";
                } else if (this._mouseOver && !this._focused) {
                    state = "msover";
                } else if (this._focused) {
                    if (this._mouseOver) {
                        state = "msoverFocused";
                    } else {
                        state = "normalFocused";
                    }
                }
            }
            this._state = state;
            if (!skipChangeState) {
                // force widget - DOM mapping
                this.getDom();
                if (!this._simpleHTML) {
                    this._frame.changeState(this._state);
                    if (state == "disabled") {
                        this._focusElt.className = "xButton xButtonDisabled";
                    } else {
                        this._focusElt.className = "xButton";
                    }
                }
                var disabledAttribute = cfg.focusableWhenDisabled ? (cfg.waiAria ? "aria-disabled" : null) : "disabled";
                if (disabledAttribute) {
                    if (state == "disabled") {
                        this._focusElt.setAttribute(disabledAttribute, "true");
                    } else {
                        this._focusElt.removeAttribute(disabledAttribute);
                    }
                }
            }
        }
389384
function _handleDeleteFilter(e) {
        // Remove the filter set from the preferences and
        // clear the active filter set index from view state.
        var filterSets        = PreferencesManager.get("fileFilters") || [],
            activeFilterIndex = PreferencesManager.getViewState("activeFileFilter"),
            filterIndex       = $(e.target).parent().data("index") - FIRST_FILTER_INDEX;

        // Don't let the click bubble upward.
        e.stopPropagation();

        filterSets.splice(filterIndex, 1);
        PreferencesManager.set("fileFilters", filterSets);

        if (activeFilterIndex === filterIndex) {
            // Removing the active filter, so clear the active filter
            // both in the view state.
            setActiveFilter(null);
        } else if (activeFilterIndex > filterIndex) {
            // Adjust the active filter index after the removal of a filter set before it.
            --activeFilterIndex;
            setActiveFilter(filterSets[activeFilterIndex], activeFilterIndex);
        }

        _updatePicker();
        _doPopulate();
        _picker.refresh();
    }
1263643
@EventHandler
    public void onSelectFilter(SelectFilterEvent selectFilterEvent){
        for (FacetWidget facetWidget : filterList) {
            if(facetWidget.getFacetField().equals(selectFilterEvent.getFilterName())){
                for (FacetWidgetItem facetWidgetItem : facetWidget.getFacetWidgetItems()) {
                    if(facetWidgetItem.getValue().equals(selectFilterEvent.getFilterValue())){
                        facetWidget.selectItems(Arrays.asList(facetWidgetItem));
                    }
                }
            }
        }

    }
585501
private void excludeChildrenFromInterceptions(View node) {
        // If additional types of children should be excluded (e.g. horizontal
        // scrolling banners),
        // this needs to be modified accordingly.
        if (node instanceof WebView) {
            mChildrenNeedingAllTouches.add(node);
        } else if (node instanceof ViewGroup) {
            ViewGroup viewGroup = (ViewGroup) node;
            final int childCount = viewGroup.getChildCount();
            for (int i = 0; i < childCount; i++) {
                final View child = viewGroup.getChildAt(i);
                excludeChildrenFromInterceptions(child);
            }
        }
    }
131028
def purgeDeletedWidgets():
        """"""
        toremove = []
        for field in AbstractEditorWidget.funit_fields:
            if sip.isdeleted(field):
                toremove.append(field)
        for field in toremove:
            AbstractEditorWidget.funit_fields.remove(field)

        toremove = []
        for field in AbstractEditorWidget.tunit_fields:
            if sip.isdeleted(field):
                toremove.append(field)
        for field in toremove:
            AbstractEditorWidget.tunit_fields.remove(field)
785696
def remove_widget widget
     if widget.respond_to? :name and !widget.name.nil?
       @by_name.delete(widget.name)
     end
     @focusable_modified = true
     @widgets.delete widget
   end
1137909
def as_widget(self, widget=None, attrs=None, only_initial=False):
        
        if not widget:
            widget = self.field.widget

        if self.field.localize:
            widget.is_localized = True

        attrs = attrs or {}
        attrs = self.build_widget_attrs(attrs, widget)
        auto_id = self.auto_id
        if auto_id and 'id' not in attrs and 'id' not in widget.attrs:
            if not only_initial:
                attrs['id'] = auto_id
            else:
                attrs['id'] = self.html_initial_id

        if not only_initial:
            name = self.html_name
        else:
            name = self.html_initial_name
        if isinstance(widget, SmartWidgetMixin) and hasattr(self.form, '_request'):
            return force_text(widget.smart_render(self.form._request, name, self.value(), self.initial,
                                                  self.form, attrs=attrs))
        else:
            return force_text(widget.render(name, self.value(), attrs=attrs))
1090556
function ( fields ) {

            var field, data = {}, key, value;

            for ( var i = fields.length - 1; i >= 0; i-- ) {

                field = fields[ i ];

                field.removeAttribute( 'name' );
                key = field.getAttribute( this.fieldNameAttribute );
                value = field.value;

                // Cater for select boxes
                if ( field.options && typeof field.selectedIndex !== "undefined" ) {
                    value = field.options[ field.selectedIndex ].value;
                }

                data[ key ] = value;

            }
            
            return data;

        }
361341
public void removeValue() {

        if (!isSimpleValue()) {
            m_hasValue = false;
            m_widgetHolder.clear();
            generateLabel();
        } else {
            // only deactivate the widget and restore the default value
            m_widget.setActive(false);
            m_widget.setValue("");
            addActivationHandler();
        }
        addStyleName(formCss().emptyValue());
        removeValidationMessage();
    }
849574
@Override
  @UiChild(limit = 1, tagname = "widget")
  public void setChildWidget(final TakesValue<T> pwidget) {
    widget = (Widget) pwidget;
    contents.add(widget);
    setEditor(new ExtendedValueBoxEditor<>(pwidget, this));
    if (pwidget instanceof HasFocusHandlers) {
      ((HasFocusHandlers) pwidget).addFocusHandler(pevent -> addStyleToLabel());
    }
    if (pwidget instanceof HasBlurHandlers) {
      ((HasBlurHandlers) pwidget).addBlurHandler(pevent -> {
        boolean hide = true;
        if (widget instanceof TakesValue<?>) {
          hide = StringUtils.isEmpty(Objects.toString(((TakesValue<?>) widget).getValue(), null));
        }
        if (hide) {
          removeStyleFromLabel();
        }
      });
    }
  }
820602
def customize_form_field(self, name, field):
        
        if isinstance(field, forms.fields.DateField) and isinstance(field.widget, forms.widgets.DateInput):
            field.widget = widgets.DatePickerWidget()
            field.input_formats = [field.widget.input_format[1]] + list(field.input_formats)

        if isinstance(field, forms.fields.ImageField) and isinstance(field.widget, forms.widgets.ClearableFileInput):
            field.widget = widgets.ImageThumbnailWidget()

        return field
302936
function (skipChangeState) {
            var state = "normal";
            var cfg = this._cfg;

            if (cfg.disabled) {
                state = "disabled";
            } else if (cfg.tabId === cfg.selectedTab) {
                state = "selected";
            } else {
                if (this._mouseOver) {
                    state = "msover";
                }
            }

            if (this._hasFocus) {
                state += "Focused";
            }
            this._state = state;

            if (!skipChangeState) {
                // force widget - DOM mapping
                this.getDom();
                this._frame.changeState(this._state);
            }
        }
244025
def filter(self, field_name, field_value):
        
        self.filters.append((field_name, field_value))
        return self
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);
        }
19158
function() {

		var input_element = this.getDOMElement();
		Firestorm.Element.removeListener(input_element, "onpropertychange", this._OldIE_property_change_callback);
		Firestorm.Element.removeListener(input_element, "selectionchange", this._OldIE_refresh_callback);
		Firestorm.Element.removeListener(input_element, "keyup", this._OldIE_refresh_callback);
		Firestorm.Element.removeListener(input_element, "keydown", this._OldIE_refresh_callback);

		this.Element$informRemove();

	}