Update form values when detection method is selected.
439545
def update_values(self):
        """"""
        self.method = self.idx_method.currentText()
        sw_det = DetectSlowWave(method=self.method)

        self.index['f1'].set_value(sw_det.det_filt['freq'][0])
        self.index['f2'].set_value(sw_det.det_filt['freq'][1])
        self.index['min_trough_dur'].set_value(sw_det.trough_duration[0])
        self.index['max_trough_dur'].set_value(sw_det.trough_duration[1])
        self.index['max_trough_amp'].set_value(sw_det.max_trough_amp)
        self.index['min_ptp'].set_value(sw_det.min_ptp)
        self.index['min_dur'].set_value(sw_det.min_dur)
        self.index['max_dur'].set_value(sw_det.max_dur)
884953
public function updateValue()
    {
        foreach ($this->getDataSources() as $ds) {
            if (!$ds instanceof HTML_QuickForm2_DataSource_Submit &&
                null !== ($value = $ds->getValue($this->getName())))
            {
                $this->setContent($value);
                return;
            }
        }
    }
104313
def on_value_change(self, picker, old, new):
        
        d = self.declaration
        with self.widget.setValue.suppressed():
            d.value = new
621443
public function updateSearchForm($form){
		if($this->modelIsMultiSitesAware()) {
			$managedSites = Multisites::inst()->sitesManagedByMember();

			$source = Site::get()->filter('ID', Multisites::inst()->sitesManagedByMember())->map('ID', 'Title')->toArray();
			$plural = singleton($this->owner->modelClass)->plural_name();
			if(count($source)){
				$activeSite = $this->getActiveSite();
				$form->Fields()->push(DropdownField::create(
					'SiteID', 
					"Site: ", 
					$source,
					$activeSite ? $activeSite->ID : null
				));
			}
		}
	}
503997
public void refresh() {
		if (logger.isDebugEnabled()) {
			logger.debug("Refreshing held value '"
					+ StylerUtils.style(super.getValue()) + "'");
		}
		setValue(refreshFunction.call(null));
	}
97036
private void updateSelection() {
        Dateitem selectedItem = getSelectedItem();
        
        if (selectedItem == null) {
            addStyle("color", "gray");
        } else {
            addStyle("color", "inherit");
        }
        
        setFocus(false);
    }
1307467
protected void updateSelectedItemsFromValueModel() {
        Object value = getValue();
        Object[] selectedValues = EMPTY_VALUES;
        if (value != null) {
            selectedValues = (Object[]) convertValue(value, Object[].class);
        }

        // flag is used to avoid a round trip while we are selecting the values
        selectingValues = true;
        try {
            ListSelectionModel selectionModel = getList().getSelectionModel();
            selectionModel.setValueIsAdjusting(true);
            try {
                int[] valueIndexes = determineValueIndexes(selectedValues);
                int selectionMode = getSelectionMode();
                if (selectionMode == ListSelectionModel.SINGLE_SELECTION && valueIndexes.length > 1) {
                    getList().setSelectedIndex(valueIndexes[0]);
                } else {
                    getList().setSelectedIndices(valueIndexes);
                }

                // update value model if selectedValues contain elements which where not found in the list model
                // elements
                if (valueIndexes.length != selectedValues.length && !isReadOnly() && isEnabled()
                        || (selectionMode == ListSelectionModel.SINGLE_SELECTION && valueIndexes.length > 1)) {
                    updateSelectedItemsFromSelectionModel();
                }
            } finally {
                selectionModel.setValueIsAdjusting(false);
            }
        } finally {
            selectingValues = false;
        }
    }
1161260
private void updateFromPicker() {

        checkTime();
        Date date = m_picker.getValue();
        if (!m_dateOnly) {
            String timeAsString = getTimeText();
            date = CmsDateConverter.getDateWithTime(date, timeAsString);
        }
        setValue(date);
        setErrorMessage(null);
        fireChange(date, false);
    }
565142
def OnUpdate(self, event):
        """"""

        attributes = event.attr

        self._update_buttoncell(attributes["button_cell"])

        self.Refresh()

        event.Skip()
872685
function(deselectValues, triggerOnChange) {
            if(!$.isArray(deselectValues)) {
                deselectValues = [deselectValues];
            }

            for (var i = 0; i < deselectValues.length; i++) {
                var value = deselectValues[i];

                if (value === null || value === undefined) {
                    continue;
                }

                var $option = this.getOptionByValue(value);
                var $checkbox = this.getInputByValue(value);

                if($option === undefined || $checkbox === undefined) {
                    continue;
                }

                if (this.options.selectedClass) {
                    $checkbox.closest('li')
                        .removeClass(this.options.selectedClass);
                }

                $checkbox.prop('checked', false);
                $option.prop('selected', false);

                if (triggerOnChange) {
                    this.options.onChange($option, false);
                }
            }

            this.updateButtonText();
            this.updateSelectAll();
        }
127762
public void update(boolean submit) {

        boolean ok = (m_propertyValidationStatus == VALIDATION_OK) && (m_aliasValidationStatus == VALIDATION_OK);
        if (submit && ok) {
            saveProperties();
            saveAliases();
            hide();
        }
    }
572143
function(values, sendUpdatedEvt) {
		if(!values) {
         return;
      }
      var i, n=this.inputs.length;
	   for (i = 0 ; i < n ; i++) {
	      this.inputs[i].setValue(values[i], false);
      }
      
      this.runFieldsInteractions();
      
	   if(sendUpdatedEvt !== false) {
	      // fire update event
         this.fireUpdatedEvt();
      }
	}
248436
def _notify_change(self, model, attr, old, new, hint=None, setter=None, callback_invoker=None):
        ''' 

        '''
        # if name changes, update by-name index
        if attr == 'name':
            if old is not None:
                self._all_models_by_name.remove_value(old, model)
            if new is not None:
                self._all_models_by_name.add_value(new, model)

        if hint is None:
            serializable_new = model.lookup(attr).serializable_value(model)
        else:
            serializable_new = None

        event = ModelChangedEvent(self, model, attr, old, new, serializable_new, hint, setter, callback_invoker)
        self._trigger_on_change(event)
609591
protected void onValueSelect(String value, boolean fireEvents) {

        String oldValue = m_selectedValue;
        selectValue(value);
        if (fireEvents) {
            if ((oldValue == null) || !oldValue.equals(value)) {
                // fire value change only if the the value really changed
                ValueChangeEvent.<String> fire(this, value);
            }
        }
    }
692337
def update(self, observable, handlers):
        """"""
        addedreaders, removedreaders = handlers
        for reader in addedreaders:
            item = self.Append(str(reader))
            self.SetClientData(item, reader)
        for reader in removedreaders:
            item = self.FindString(str(reader))
            if wx.NOT_FOUND != item:
                self.Delete(item)
        selection = self.GetSelection()
279557
protected void updateFromSelection() {
    DBIDSelection sel = context.getSelection();
    if(sel != null) {
      this.dbids = DBIDUtil.newArray(sel.getSelectedIds());
      this.dbids.sort();
    }
    else {
      this.dbids = DBIDUtil.newArray();
    }
  }
25489
private function updateRepr(): void
    {
        $this->message = $this->rawMessage;

        $dot = false;
        if (mb_substr($this->message, -1) === '.') {
            $this->message = mb_substr($this->message, 0, -1);
            $dot = true;
        }

        if ($this->parsedLine >= 0) {
            $this->message .= sprintf(' at line %d', $this->parsedLine);
        }

        if ($this->snippet) {
            $this->message .= sprintf(' (near "%s")', $this->snippet);
        }

        if ($dot) {
            $this->message .= '.';
        }
    }