Add an item to the list when the select changed
180333
function() {
			
			var value, position, choice;
			
			if (this.el.selectedIndex !== 0) {
				
				// Get the selector value
				value = inputEx.MultiSelectField.superclass.getValue.call(this);
				
				position = this.getChoicePosition({ value : value });
				choice = this.choicesList[position];
				
				this.ddlist.addItem({ value: value, label: choice.label });
				
				// hide choice that has just been selected (+ select first choice)
				this.hideChoice({ position : position });
				this.el.selectedIndex = 0;
				
				this.fireUpdatedEvt();
				
			}
		}
822229
function add(changeList, property, index, values) {
        changeList.push({
            type:'add',
            path: property,
            index: index,
            vals: values
        })
    }
39665
function select(bind, el, param, value) {
  var node = element('select', {name: param.signal});

  param.options.forEach(function(option) {
    var attr = {value: option};
    if (valuesEqual(option, value)) attr.selected = true;
    node.appendChild(element('option', attr, option+''));
  });

  el.appendChild(node);

  node.addEventListener('change', function() {
    bind.update(param.options[node.selectedIndex]);
  });

  bind.elements = [node];
  bind.set = function(value) {
    for (var i=0, n=param.options.length; i<n; ++i) {
      if (valuesEqual(param.options[i], value)) {
        node.selectedIndex = i; return;
      }
    }
  };
}
867510
function() {
			YAHOO.util.Event.addListener(this.el,"change", this.onAddNewItem, this, true);
			this.ddlist.itemRemovedEvt.subscribe(this.onItemRemoved, this, true);
			this.ddlist.listReorderedEvt.subscribe(this.fireUpdatedEvt, this, true);
		}
341987
def _on_select(self, *args):
        
        if callable(self.__callback):
            self.__callback(self.selection)
164613
function add(scope, element) {
        updateDelayed();

        items.push({
            element: element,
            scope:   scope
        });
    }
500000
function(item) {
        var id = item.id || item;

        var removedItem;
        var index = Selectivity.findIndexById(this._data, id);
        if (index > -1) {
            removedItem = this._data[index];
            this._data.splice(index, 1);
        }

        if (this._value[index] !== id) {
            index = this._value.indexOf(id);
        }
        if (index > -1) {
            this._value.splice(index, 1);
        }

        if (removedItem) {
            this.triggerChange({ removed: removedItem });
        }

        if (id === this._highlightedItemId) {
            this._highlightedItemId = null;
        }

        this._updateInputWidth();
    }
1171503
function select_dropdown_item (item) {
          if(item) {
              if(selected_dropdown_item) {
                  deselect_dropdown_item($(selected_dropdown_item));
              }

              item.addClass($(input).data("settings").classes.selectedDropdownItem);
              selected_dropdown_item = item.get(0);
          }
      }
993232
def select_option(self, option):
        
        items_list = self.get_options()
        for item in items_list:
            if item.get_attribute("value") == option:
                item.click()
                break
1087694
@EventHandler("change")
    private void onChange(ChangeEvent event) {
        // When the custom range item is selected, triggers the display of the date range dialog.
        if (event.getRelatedTarget() == customItem) {
            event.stopPropagation();
            DateRangeDialog.show((range) -> {
                setSelectedItem(range == null ? lastSelectedItem : addChoice(range, true));
                checkSelection(false);
            });
            
        }
757997
def select_item(self, items):
        
        if not items:
            return
        elif not hasattr(items, "__iter__"):
            items = (items,)
        selection_changed = False
        with self._suppress_selection_events():
            for item in items:
                self.queue_draw_item(item)
                if item is not None and item.model not in self._selection:
                    self._selection.add(item.model)
                    selection_changed = True
        if selection_changed:
            self.emit('selection-changed', self._get_selected_items())
667563
function(selected, e) {
        var data = [];
        $.each(selected, function(index, value) {
            data.push({
                id: $(value).attr('data-id'),
                title: $(value).next()[0].lastChild.nodeValue
            });
            $(value).bizCheckbox('disable').bizCheckbox('uncheck');
        });

        this.$main.find('.biz-transfer-list-header :checkbox').bizCheckbox('uncheck');

        var me = this;
        $.each(data, function(index, value) {
            me.$rightListBody.append(['<li class="biz-transfer-list-content-item">',
                '<input type="checkbox" data-id="' + value.id + '" title="' + value.title + '" /></li>'
            ].join(''));
        });

        this.$rightListBody.find(':checkbox').bizCheckbox({
            theme: this.options.theme
        });

        if (this.options.onChange) {
            this.options.onChange.call(this, data, e);
        }
    }
643664
def append(self, item):
        
        self.check_insertion(item)

        self.real_list.append(item)
        self._items |= {item}
1113521
function onchange(array, index, removed, added) {
		edb.Array.$onchange(array, index, removed, added);
	}
57107
def insert(self, index, item):
        """"""
        super(ObservableList, self).insert(index, item)
        length = len(self)
        if index >= length:
            index = length - 1
        elif index < 0:
            index += length - 1
            if index < 0:
                index = 0
        self._notify_add_at(index)
589686
def _list_selection_changed(self):
        """"""
        items = self.list_layers_in_map_report.selectedItems()
        self.remove_layer.setEnabled(len(items) >= 1)
        if len(items) == 1 and self.list_layers_in_map_report.count() >= 2:
            index = self.list_layers_in_map_report.indexFromItem(items[0])
            index = index.row()
            if index == 0:
                self.move_up.setEnabled(False)
                self.move_down.setEnabled(True)
            elif index == self.list_layers_in_map_report.count() - 1:
                self.move_up.setEnabled(True)
                self.move_down.setEnabled(False)
            else:
                self.move_up.setEnabled(True)
                self.move_down.setEnabled(True)
        else:
            self.move_up.setEnabled(False)
            self.move_down.setEnabled(False)
254846
function() {
      var self = this,
          val = $.map(self.items(), function(item) {
            return self.options.itemValue(item).toString();
          });

      self.$element.val(val, true);

      if (self.options.triggerChange)
        self.$element.trigger('change');
    }