Handle the change in a field value. Reset any cached calculated
values affected by this change, pass on the event to any external
listeners.

@param field field changed
@param oldValue old field value
@param newValue new field value
182439
private void fireFieldChangeEvent(ResourceField field, Object oldValue, Object newValue)
   {
      //
      // Internal event handling
      //
      switch (field)
      {
         case UNIQUE_ID:
         {
            ProjectFile parent = getParentFile();
            if (oldValue != null)
            {
               parent.getResources().unmapUniqueID((Integer) oldValue);
            }
            parent.getResources().mapUniqueID((Integer) newValue, this);

            if (m_assignments.isEmpty() == false)
            {
               for (ResourceAssignment assignment : m_assignments)
               {
                  assignment.setResourceUniqueID((Integer) newValue);
               }
            }
            break;
         }

         case COST:
         case BASELINE_COST:
         {
            m_array[ResourceField.COST_VARIANCE.getValue()] = null;
            break;
         }

         case WORK:
         case BASELINE_WORK:
         {
            m_array[ResourceField.WORK_VARIANCE.getValue()] = null;
            break;
         }

         case BCWP:
         case ACWP:
         {
            m_array[ResourceField.CV.getValue()] = null;
            m_array[ResourceField.SV.getValue()] = null;
            break;
         }

         case BCWS:
         {
            m_array[ResourceField.SV.getValue()] = null;
            break;
         }

         case PEAK:
         case MAX_UNITS:
         {
            m_array[ResourceField.OVERALLOCATED.getValue()] = null;
            break;
         }

         default:
         {
            break;
         }
      }

      //
      // External event handling
      //
      if (m_listeners != null)
      {
         for (FieldListener listener : m_listeners)
         {
            listener.fieldChange(this, field, oldValue, newValue);
         }
      }
   }
572961
@Override
    public boolean updateValuesForField(String currentValue) {
        Utils.require(m_dbObj.getObjectID().equals(currentValue), "Object ID cannot be changed");
        return false;
    }
734760
public static void putValue(String key, Object newValue) {
        Object oldValue = CFG.get(key);
        if (changed(oldValue, newValue)) {
            CFG.put(key, newValue);
            List<RpcConfigListener> rpcConfigListeners = CFG_LISTENER.get(key);
            if (CommonUtils.isNotEmpty(rpcConfigListeners)) {
                for (RpcConfigListener rpcConfigListener : rpcConfigListeners) {
                    rpcConfigListener.onChange(oldValue, newValue);
                }
            }
        }
    }
1141289
private void updateValue() {
        if (list != null) {
            int oldCount = this.count;
            this.count = list.getSelectedIndices().length;
            maybeNotifyListeners(oldCount, count);
        }
    }
1327573
public synchronized void onPropertyValueChanged(Property property, Object oldValue, Object newValue) {
        if (!configuration.isUseGc()) {
            return;
        }
        removeReferenceAndCheckForGC(property, oldValue);

        if (newValue != null && DolphinUtils.isDolphinBean(newValue.getClass())) {
            Instance instance = getInstance(newValue);
            Reference reference = new PropertyReference(propertyToParent.get(property), property, instance);
            if (reference.hasCircularReference()) {
                throw new CircularDependencyException("Circular dependency detected!");
            }
            instance.getReferences().add(reference);
            removeFromGC(instance);
        }
    }
388928
protected Object handleColumnValue(final Object oldValue, final Database database) {
      final Object newValue = WktConversionUtils.handleColumnValue(oldValue, database, this);
      return newValue;
   }
575196
protected void firePropertyChange(String propertyName, Object oldValue,
			Object newValue) {
		
		
		if (oldValue instanceof JsonValue) {
			oldValue = getRawObject((JsonValue)oldValue);
		}
		
		if (newValue instanceof JsonValue) {
			newValue = getRawObject((JsonValue)newValue);
		}
		changeSupport.firePropertyChange(propertyName, oldValue, newValue);
	}
645230
@Override
    public void setValue(Boolean value, boolean fireEvents) {
        boolean oldValue = getValue();
        if (value) {
            input.getElement().setAttribute("checked", "true");
        } else {
            input.getElement().removeAttribute("checked");
        }

        if (fireEvents && oldValue != value) {
            ValueChangeEvent.fire(this, getValue());
        }
    }
383994
public final void setNewVertexValue(VV newValue) {
		if (setNewVertexValueCalled) {
			throw new IllegalStateException("setNewVertexValue should only be called at most once per updateVertex");
		}
		setNewVertexValueCalled = true;

		outVertex.f1 = newValue;

		out.collect(Either.Left(outVertex));
	}
1288453
function (propertyName, newValue, oldValue) {
            if (propertyName === 'value') {
                this._checkValue();// checks the value changed in the data model is a valid value from the select
                // options
                if (this.controller) {
                    var report = this.controller.checkValue(newValue);
                    this._reactToControllerReport(report, {
                        stopValueProp : true
                    });
                } else {
                    this._selectValue(newValue);
                }
            } else if (propertyName === 'mandatory') {
                this._updateState();
            } else if (propertyName === 'readOnly' || propertyName === 'disabled') {
                var selectField = this.getSelectField();
                var disabledOrReadonly = this.getProperty("disabled") || this.getProperty("readOnly");
                if (this._skinObj.simpleHTML) {
                    selectField.disabled = disabledOrReadonly ? "disabled" : "";
                }
                var tabIndex = disabledOrReadonly ? -1 : this._calculateTabIndex();
                selectField.tabIndex = tabIndex;
                this._updateState();
            } else if (propertyName === 'options') {
                if (this.controller) {
                    var selectValue = this.controller.getDataModel().value;
                    this.controller.setListOptions(newValue);
                    var report = this.controller.checkValue(selectValue);
                    this._reactToControllerReport(report, {
                        stopValueProp : false
                    });
                } else {
                    // markup for the options
                    var optionsMarkup = [];
                    var stringUtils = ariaUtilsString;
                    for (var i = 0, l = newValue.length; i < l; i++) {
                        // string cast, otherwise encoding will fail
                        var optValue = '' + newValue[i].value;
                        optionsMarkup.push('<option value="', stringUtils.encodeForQuotedHTMLAttribute(optValue), '">', stringUtils.escapeHTML(newValue[i].label), '</option>');
                    }

                    var selectField = this.getSelectField();
                    var currentValue = selectField.value;
                    // update the options list
                    var optionsListString = optionsMarkup.join('');
                    if (ariaCoreBrowser.isIE9 || ariaCoreBrowser.isIE8 || ariaCoreBrowser.isIE7) {
                        // innerHTML replacing in IE truncates the first element and breaks the whole select...
                        selectField.innerHTML = '';
                        var helperDiv = Aria.$window.document.createElement('div');
                        helperDiv.innerHTML = '<select>' + optionsListString + '</select>';
                        var options = helperDiv.children[0].children;
                        while (options.length) {
                            selectField.appendChild(options[0]);
                        }
                    } else {
                        selectField.innerHTML = optionsListString;
                    }
                    this._selectValue(currentValue);
                }

            } else if (propertyName === 'formatError' || propertyName === 'formatErrorMessages'
                    || propertyName === 'error' || propertyName === 'errorMessages') {
                this._cfg[propertyName] = newValue;
                this._updateState();
            } else {
                this.$DropDownInput._onBoundPropertyChange.apply(this, arguments);
            }
        }
1187116
protected void fireAttributeChangedEvent(String name, AttributeValue oldValue, AttributeValue currentValue) {
		if (this.listeners != null && isEventFirable()) {
			final AttributeChangeEvent event = new AttributeChangeEvent(
					//source
					this,
					//type
					Type.VALUE_UPDATE,
					//old name
					name,
					//old value
					oldValue,
					//current name
					name,
					//current value
					currentValue);
			for (final AttributeChangeListener listener : this.listeners) {
				listener.onAttributeChangeEvent(event);
			}
		}
	}
243096
public function setNewValue($field, $value)
    {
        $this->assertValidField($field);

        $this->entityChangeSet[$field][1] = $value;
    }
389785
function() {
      try {
         // Close previous field
         if(this.fieldValue) {
            this.fieldValue.close();
            this.fieldValue.destroy();
            delete this.fieldValue;
            this.fieldValueWrapper.innerHTML = '';
         }
      
         // Re-build the fieldValue
         var fieldOptions = this.group.getValue();
         
         fieldOptions.type = this.getValue().type;
         fieldOptions.parentEl = this.fieldValueWrapper;
         
         this.fieldValue = inputEx(fieldOptions,this);
      
         // Refire the event when the fieldValue is updated
         this.fieldValue.updatedEvt.subscribe(this.fireUpdatedEvt, this, true);
      }
      catch(ex) {
         console.log("Error while updateFieldValue", ex.message);
      }
   }
538475
public void setValue(Object newValue)
    {
    	if (NOT_KNOWN.equals(newValue))
    	{
        	m_proxyField.updateValue();
    		m_proxyField.setNotKnown(true);
    		return;
    	}
    	if (UNKNOWN.equals(newValue))
    	{
    		m_proxyField.reset();
        	m_proxyField.updateValue();
    		return;
    	}
    	m_proxyField.setValue(newValue);
    	m_proxyField.updateValue();
    }
255829
public void set(T newValue) throws IOException, InterruptedException {
    try {
      set0(newValue);
    } catch (InterruptedIOException | ClosedByInterruptException e) {
      throw new InterruptedException(e.getMessage());
    }
  }
514878
@Override
    public boolean updateValuesForField(String currentValue) {
        boolean bUpdated = false;
        FieldDefinition fieldDef = m_tableDef.getFieldDef(m_fieldName);
        if (fieldDef == null || !fieldDef.isCollection()) {
            bUpdated = updateSVScalar(currentValue);
        } else {
            bUpdated = updateMVScalar(currentValue);
        }
        return bUpdated;
    }
544578
public void setField(Object o, String fieldName, Object newValue) {
        if (o == null) {
            throw new IllegalArgumentException("No object to set on provided");
        }
        Field field = findField(o, fieldName);
        if (field == null) {
            throw new IllegalArgumentException(o.getClass() + " does not have a field " + fieldName);
        } else {
            if (!field.isAccessible()) {
                field.setAccessible(true);
            }
            try {
                field.set(o, newValue);
            } catch (IllegalAccessException e) {
                throw new IllegalArgumentException("Unable to set " + newValue + " for " + fieldName, e);
            }
        }
    }