Changes the Toggle's valueOn, updating facet refinements accordingly.

@param newValue valueOn's new value.
@param newName  an eventual new attribute name.
3738
public void setValueOn(String newValue, @Nullable String newName) {
        if (isChecked()) { // refining on valueOn: facetRefinement needs an update
            searcher.updateFacetRefinement(attribute, valueOn, false)
                    .updateFacetRefinement(newName != null ? newName : attribute, newValue, true)
                    .search();
        }
        this.valueOn = newValue;
        applyEventualNewAttribute(newName);
    }
1339321
public Versioned<V> update(V newValue, long newVersion) {
    Versioned<V> previousValue = value;
    value = new Versioned<>(newValue, newVersion);
    return previousValue;
  }
1071536
public static void setPropertyValue( final Object root,
                                         final Object newValue,
                                         final String... properties ) {

        Object object = root;

        int index = 0;


        try {

            for ( String property : properties ) {


                Map<String, FieldAccess> fields = getFieldsFromObject( object );
                FieldAccess field = fields.get( property );


                if ( isDigits( property ) ) {
                    /* We can index numbers and names. */
                    object = idx ( object, StringScanner.parseInt(property) );

                } else {

                    if ( field == null ) {
                        die( Str.sputs(
                                        "We were unable to access property=", property,
                                        "\nThe properties passed were=", properties,
                                        "\nThe root object is =", root.getClass().getName(),
                                        "\nThe current object is =", object.getClass().getName()
                                )
                        );
                    }


                    if ( index == properties.length - 1 ) {
                        field.setValue( object, newValue );
                    } else {
                        object = field.getObject( object );
                    }
                }

                index++;
            }
        } catch (Exception ex) {
            Exceptions.requireNonNull(root, "Root cannot be null");
            handle(ex, "Unable to set property for root object", className(root),
                    "for property path", properties, "with new value", newValue,
                    "last object in the tree was",
                    className(object), "current property index", index);
        }

    }
1363467
public void addNewChoiceAttributeValue(CmsAttributeValueView reference, List<String> choicePath) {

        CmsValueFocusHandler.getInstance().clearFocus();
        m_widgetService.addChangedOrderPath(getSimplePath(-1));
        if (isChoiceHandler()) {
            addChoiceOption(reference, choicePath);
        } else {
            addComplexChoiceValue(reference, choicePath);
        }
        updateButtonVisisbility();
        CmsUndoRedoHandler handler = CmsUndoRedoHandler.getInstance();
        if (handler.isIntitalized()) {
            handler.addChange(m_entity.getId(), m_attributeName, reference.getValueIndex() + 1, ChangeType.choice);
        }
    }
1269469
function (newValue) {
            var gaugeSpanIndex = this.showLabel ? 1 : 0;
            var barEl = this.getDom().childNodes[gaugeSpanIndex].firstChild;
            var calcValue = this.__calculateBarWidth(newValue);
            if (barEl !== null && calcValue !== null && calcValue != -1) {
                barEl.style.width = calcValue + "%";
            }
            barEl = null;
        }
965171
public void setLoginUser(String newValue)
    {
        if (newValue == null) {
            this.loginUser = null;
        }
        else {
            this.loginUser = newValue.trim();
        }
    }
693335
public function replace($oldValue, $newValue)
    {
        if (!is_string($oldValue)) {
            throw new UnexpectedTypeException($oldValue, 'string', 'oldValue');
        }
        if (empty($oldValue)) {
            return;
        }
        if (!is_string($newValue) && null !== $newValue) {
            throw new UnexpectedTypeException($newValue, 'string or null', 'newValue');
        }

        $key = array_search($oldValue, $this->values, true);
        if (false !== $key) {
            if (empty($newValue)) {
                unset($this->values[$key]);
            } else {
                $this->values[$key] = $newValue;
            }
        }
    }
937276
public void handleChangeTemplateContext(final CmsContainerPageElementPanel element, final String newValue) {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(newValue) || CmsTemplateContextInfo.EMPTY_VALUE.equals(newValue)) {
            if (CmsInheritanceContainerEditor.getInstance() != null) {
                CmsInheritanceContainerEditor.getInstance().removeElement(element);
            } else {
                removeElement(element, ElementRemoveMode.silent);
            }
        }
    }
702823
public void setAttribute(Object object, String attribute, Object newValue) {
        delegate.setAttribute(object, attribute, newValue);
    }
765794
public void setValue(Object newValue) {
        Object checkedValue = checkValue(newValue);
        setDirty(isDifferent(baseValue, checkedValue));
        if (isDifferent(value, checkedValue)){ // firePropertyChange doesn't do this check sufficiently
            firePropertyChange(VALUE, value, value = checkedValue); // set inline to avoid recursion
        }
    }
615582
function(inName, inValue) {
		if (inValue === null || inValue === false || inValue === "") {
			this.node.removeAttribute(inName);
		} else {
			this.node.setAttribute(inName, inValue);
		}
	}
1117306
public void setNewVertexValue(VV newValue) {
		if (setNewVertexValueCalled) {
			throw new IllegalStateException("setNewVertexValue should only be called at most once per updateVertex");
		}
		setNewVertexValueCalled = true;
		if (isOptDegrees()) {
			outValWithDegrees.f1.f0 = newValue;
			outWithDegrees.collect(outValWithDegrees);
		} else {
			outVal.setValue(newValue);
			out.collect(outVal);
		}
	}
1024243
public void setValue(Object newValue)
    {
    	if (FieldMetadata.NOT_KNOWN.equals(newValue))
    	{
            setUnknown(false);
            m_notKnown = true;
            return;
    		//throw new RuntimeException("Inconsistent use of NOT_KNOWN");
    	}
    	if (FieldMetadata.UNKNOWN.equals(newValue))
    	{
            setUnknown(true);
            m_notKnown = false;
            return;
    		//throw new RuntimeException("Inconsistent use of UNKNOWN");
    	}
        if (isDerived() && !ValidationUtils.equals(m_currentValue,newValue))
        {
            final String labelName = getPropertyMetadata().getLabelName();
            final String message = m_messageSourceAccessor.getMessage(
                    "nz.co.senanque.validationengine.derivedValue",
                    new Object[]
                    { labelName, newValue }, 
                    "Cannot set derived field.");
            throw new ValidationException(message);
        }
        m_currentValue = newValue;
        useCurrentValue(true);
        setUnknown(false);
        m_notKnown = false;
        
        addHistory(newValue);
    }
614701
public void setProperty(Object object, Object newValue) {
        MetaMethod setter = getSetter();
        if (setter == null) {
            if (field != null && !Modifier.isFinal(field.getModifiers())) {
                field.setProperty(object, newValue);
                return;
            }
            throw new GroovyRuntimeException("Cannot set read-only property: " + name);
        }
        newValue = DefaultTypeTransformation.castToType(newValue, getType());
        setter.invoke(object, new Object[]{newValue});
    }
766297
public void setValue( Object newValue ) {
        int[] newSelection = (int[]) newValue;

        if( hasChanged(currentSelection, newSelection) ) {

            int[] oldValue = currentSelection;
            currentSelection = newSelection;
            fireValueChange(oldValue, currentSelection);

            if( !skipSelectionModelUpdate) {
                // Don't want notifications while we do this
                model.removeListSelectionListener(this);

                // Install the selection on the adapted model
                model.clearSelection();

                int i = 0;
                int len = newSelection.length;
                while( i < len ) {
                    int start = newSelection[i];
                    while( i < len - 1 && newSelection[i] == newSelection[i + 1] - 1 ) {
                        i++;
                    }
                    int end = newSelection[i];
                    model.addSelectionInterval(start, end);
                    i++;
                }

                // Reinstall listener
                model.addListSelectionListener(this);
            }
        }
    }
350779
function (name, newValue) {
		if (arguments.length > 1) {
			this.setValue(name, newValue);
		}
		else {
			var attrs = name;
			this.setMap(attrs);
		}
	}
612385
public void setUrl(String newValue)
    throws JspCoreException
    {
        if (newValue == null) {
            throw new JspCoreException(JspConstants.NullUrl);
        }
        this.url = newValue.trim();
    }