Creates the field debug-info for the given field, which changed
from oldValue to newValue in the given component.
ATTENTION: this method is duplicate in UIInput.
@param facesContext
@param field
@param oldValue
@param newValue
@param clientId
326061
public static void createFieldDebugInfo(FacesContext facesContext,
            final String field, Object oldValue, 
            Object newValue, String clientId)
    {
        if ((oldValue == null && newValue == null)
                || (oldValue != null && oldValue.equals(newValue)))
        {
            // nothing changed - NOTE that this is a difference to the method in 
            // UIInput, because in UIInput every call to this method comes from
            // setSubmittedValue or setLocalValue and here every call comes
            // from the VisitCallback of the PhaseListener.
            return;
        }
        
        // convert Array values into a more readable format
        if (oldValue != null && oldValue.getClass().isArray())
        {
            oldValue = Arrays.deepToString((Object[]) oldValue);
        }
        if (newValue != null && newValue.getClass().isArray())
        {
            newValue = Arrays.deepToString((Object[]) newValue);
        }
        
        // NOTE that the call stack does not make much sence here
        
        // create the debug-info array
        // structure:
        //     - 0: phase
        //     - 1: old value
        //     - 2: new value
        //     - 3: StackTraceElement List
        // NOTE that we cannot create a class here to encapsulate this data,
        // because this is not on the spec and the class would not be available in impl.
        Object[] debugInfo = new Object[4];
        debugInfo[0] = facesContext.getCurrentPhaseId();
        debugInfo[1] = oldValue;
        debugInfo[2] = newValue;
        debugInfo[3] = null; // here we have no call stack (only in UIInput)
        
        // add the debug info
        getFieldDebugInfos(field, clientId).add(debugInfo);
    }
399212
@Override
	public void setClientID(String clientID) throws JMSException
    {
    	externalAccessLock.readLock().lock();
    	try
		{
    		checkNotClosed();
	        if (StringTools.isEmpty(clientID))
	            throw new InvalidClientIDException("Empty client ID");
	        if (this.clientID != null)
	            throw new IllegalStateException("Client ID is already set"); // [JMS SPEC]
	        this.clientID = clientID;
		}
    	finally
    	{
    		externalAccessLock.readLock().unlock();
    	}
    }
933727
@SuppressWarnings({"rawtypes", "unchecked"})
    private void initializeFormFieldWidget(final I_CmsFormField formField) {

        final I_CmsFormWidget widget = formField.getWidget();
        if (widget instanceof HasValueChangeHandlers) {
            ((HasValueChangeHandlers)widget).addValueChangeHandler(new ValueChangeHandler() {

                /**
                 * @see com.google.gwt.event.logical.shared.ValueChangeHandler#onValueChange(ValueChangeEvent event)
                 */
                public void onValueChange(ValueChangeEvent event) {

                    boolean inhibitValidation = false;
                    if (event instanceof CmsExtendedValueChangeEvent) {
                        CmsExtendedValueChangeEvent extEvent = (CmsExtendedValueChangeEvent)event;
                        inhibitValidation = extEvent.isInhibitValidation();
                    }
                    Object eventValue = event.getValue();
                    if ((eventValue instanceof String) || (event.getValue() == null)) {
                        // only makes sense for strings
                        defaultHandleValueChange(formField, (String)(event.getValue()), inhibitValidation);
                    } else if (eventValue instanceof Date) {
                        defaultHandleValueChange(formField, "" + ((Date)eventValue).getTime(), inhibitValidation);
                    } else if (eventValue instanceof Boolean) {
                        defaultHandleValueChange(formField, "" + eventValue, inhibitValidation);
                    }

                }
            });
        }

        if (widget instanceof HasKeyPressHandlers) {
            ((HasKeyPressHandlers)widget).addKeyPressHandler(new KeyPressHandler() {

                /**
                 * @see com.google.gwt.event.dom.client.KeyPressHandler#onKeyPress(com.google.gwt.event.dom.client.KeyPressEvent)
                 */
                public void onKeyPress(KeyPressEvent event) {

                    int keyCode = event.getNativeEvent().getKeyCode();
                    defaultHandleKeyPress(formField, keyCode);
                }
            });
        }
    }
1221639
protected void setInternalValue(String newValue, boolean repaintIsNotNeeded) {
        super.setInternalValue(newValue);
        extension.setSignature(newValue, changingVariables || repaintIsNotNeeded);
    }
1193144
public void setValue(FacesContext context, Object value)
            throws EvaluationException, PropertyNotFoundException {
            
        if (context == null) {
	        throw new NullPointerException("FacesContext -> null");
        }
        try {
            valueExpression.setValue(context.getELContext(), value);
        } catch (javax.el.PropertyNotFoundException pnfe) {
            throw new PropertyNotFoundException(pnfe);
        } catch (javax.el.PropertyNotWritableException pnwe) {
            throw new PropertyNotFoundException(pnwe);
        } catch (ELException elex) {
            throw new EvaluationException(elex);
        }
    }
297619
public static void setField(Class<?> type, String fieldName, Object fieldValue) {
		setField(null, type, fieldName, fieldValue);
	}
668671
function (newValue) {
                var attribute, domElt = this.getDom(), whiteList = ariaTemplatesDomElementWrapper.attributesWhiteList, newAttributeValue;
                var oldValue = this.attributes;

                // remove old members
                for (attribute in oldValue) {
                    if (oldValue.hasOwnProperty(attribute)) {
                        if (attribute == "dataset") {
                            ariaUtilsHtml.removeDataset(domElt, oldValue[attribute]);
                        } else if (!newValue[attribute]) {
                            if (attribute == "classList") {
                                this.getWrapper().classList.setClassName("");
                            } else {
                                domElt.removeAttribute(attribute);
                            }
                        }
                    }
                }

                // add new members
                for (attribute in newValue) {
                    newAttributeValue = newValue[attribute];
                    if (newValue.hasOwnProperty(attribute) && !this.__json.isMetadata(attribute)
                            && newAttributeValue != null) {
                        if (attribute == "classList") {
                            this.getWrapper().classList.setClassName(newAttributeValue.join(" "));
                        } else if (attribute == "dataset") {
                            ariaUtilsHtml.setDataset(domElt, newAttributeValue);
                        } else if (whiteList.test(attribute) && newAttributeValue !== oldValue[attribute]) {
                            domElt.setAttribute(attribute, newAttributeValue);
                        }
                    }
                }

                this.attributes = this.__json.copy(newValue);
            }
62031
@SuppressWarnings("unchecked")
    public static Map<String, List<Object[]>> getDebugInfoMap(String clientId)
    {
        final Map<String, Object> requestMap = FacesContext.getCurrentInstance()
                .getExternalContext().getRequestMap();
        Map<String, List<Object[]>> debugInfo = (Map<String, List<Object[]>>) 
                requestMap.get(ErrorPageWriter.DEBUG_INFO_KEY + clientId);
        if (debugInfo == null)
        {
            // no debug info available yet, create one and put it on the attributes map
            debugInfo = new HashMap<String, List<Object[]>>();
            requestMap.put(ErrorPageWriter.DEBUG_INFO_KEY + clientId, debugInfo);
        }
        return debugInfo;
    }
387751
private Object doGetFieldValue(String fullField, String field, Object object, boolean useCache,
            Map<String, ReflectInfo> cachedFields) {
        // check cache
        Field f;
        if (useCache) {
            ReflectInfo info = cachedFields.get(fullField);
            if (info != null) {
                return getField(info.target, info.field);
            }
        }

        int index = field.indexOf('.');
        if (index != -1) {
            String parent = field.substring(0, index);
            String sub = field.substring(index + 1);

            try {
                f = FieldUtils.findField(object.getClass(), parent);
                if (f == null) {
                    throw new RuntimeException(
                            "No field '" + parent + "' found at class " + object.getClass().getName());
                }
                f.setAccessible(true);
                Object o = f.get(object);
                if (o == null) {
                    return null;
                }
                return get(fullField, sub, o);
            } catch (Exception e) {
                throw new RuntimeException(e.getMessage(), e);
            }
        }

        f = FieldUtils.findField(object.getClass(), field);
        if (f == null) {
            throw new RuntimeException("No field '" + field + "' found at class " + object.getClass().getName());
        }
        if (useCache && !cachedFields.containsKey(fullField)) {
            cachedFields.put(fullField, new ReflectInfo(f, object));
        }
        return getField(object, f);
    }
427573
private void initFieldsValues(TypeElement component, MethodSpec.Builder createdMethodBuilder) {
    // Do not init instance fields for abstract components
    if (component.getModifiers().contains(Modifier.ABSTRACT)) {
      return;
    }

    createdMethodBuilder.addStatement(
        "$T.initComponentInstanceFields(this, new $T())",
        VueGWTTools.class,
        component);
  }
1338132
protected void setValue(int newValue, boolean updateTextField, boolean firePropertyChange) {
		int oldValue = value;
		if (newValue < min) {
			value = min;
		} else if (newValue > max) {
			value = max;
		} else {
			value = newValue;
		}

		if (updateTextField) {
			textField.setText(Integer.toString(value));
			textField.setForeground(Color.black);
		}

		if (firePropertyChange) {
			firePropertyChange("value", oldValue, value);
		}
	}
341802
private void processField(Field field) {
    PropertyMetadata propertyMetadata = IntrospectionUtils.getPropertyMetadata(field);
    if (propertyMetadata != null) {
      // If the field is from a super class, there might be some
      // overrides, so process those.
      if (!field.getDeclaringClass().equals(entityClass)) {
        applyPropertyOverride(propertyMetadata);
      }
      entityMetadata.putPropertyMetadata(propertyMetadata);
      if (field.isAnnotationPresent(Version.class)) {
        processVersionField(propertyMetadata);
      } else if (field.isAnnotationPresent(CreatedTimestamp.class)) {
        processCreatedTimestampField(propertyMetadata);
      } else if (field.isAnnotationPresent(UpdatedTimestamp.class)) {
        processUpdatedTimestampField(propertyMetadata);
      }
    }
  }
983900
function fieldAssign(elem, field, val) {
        try {
            $(exports).triggerHandler('fieldAssign', [elem, field, val]);
        } catch (err) {
            console.error(err);
        }
        var isCustomField = (elem[field] && elem[field].__read);
        var oldVal;
        if (isCustomField) {
            oldVal = elem[field].__write();
        } else {
            oldVal = elem[field];
        }
        _currentOperation.ops.push({
            op: OP_FIELD_ASSIGN,
            arg: {
                _id: elem._id,
                f: field,
                n: val,
                o: oldVal
            }
        });
    }
1348914
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
    {
        int iErrorCode = DBConstants.NORMAL_RETURN;
        Record record = this.getOwner().getRecord();
        if (record != null)
        {
            try   {
                Object varBookmark = null;
                if (record.getEditMode() == DBConstants.EDIT_IN_PROGRESS)
                { // Update the record
                    if (m_bRefreshAfterWrite)
                        varBookmark = record.getHandle(DBConstants.DATA_SOURCE_HANDLE);
                    record.set();
                }
                else if (record.getEditMode() == DBConstants.EDIT_ADD)
                {
                    record.add();
                    if (m_bRefreshAfterWrite)
                        varBookmark = record.getLastModified(DBConstants.DATA_SOURCE_HANDLE);
                }
                if (varBookmark != null)
                {
                    record.setHandle(varBookmark, DBConstants.DATA_SOURCE_HANDLE);
                    record.edit();
                }
            } catch (DBException ex)    {
                ex.printStackTrace();
                iErrorCode = ex.getErrorCode();
            }
        }
        return iErrorCode;
    }
545693
public void displayField()                  // init this field override for other value
    {
        if (m_vScreenField == null)
            return;
        for (int i = 0; i < m_vScreenField.size(); i++)
        {
            Object component = m_vScreenField.elementAt(i);
            Convert converter = null;
            if (component instanceof ScreenComponent)
                converter = ((ScreenComponent)component).getConverter();
            if (converter == null)
                converter = this;
            if ((this.getFieldName().equals(this.getNameByReflection(component)))
                || (converter.getField() == this))
            {
                if (component instanceof FieldComponent)
                    ((FieldComponent)component).setControlValue(converter.getData());
              else if (component.getClass().getName().contains("ext"))  // JTextComponent/JTextArea - TODO FIX This lame code!
                    this.setTextByReflection(component, converter.getString());
//                else if (component instanceof JTextComponent)
//                    ((JTextComponent)component).setText(converter.getString());
            }
        }
    }
56548
public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException
    {
        RendererUtils.checkParamValidity(facesContext, uiComponent, UIData.class);

        Map<String, List<ClientBehavior>> behaviors = null;
        if (uiComponent instanceof ClientBehaviorHolder)
        {
            behaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
            if (!behaviors.isEmpty())
            {
                ResourceUtils.renderDefaultJsfJsInlineIfNecessary(facesContext, facesContext.getResponseWriter());
            }
        }
        
        beforeTable(facesContext, (UIData) uiComponent);

        startTable(facesContext, uiComponent);
    }
495675
protected void renderInputBegin(FacesContext facesContext,
            UIComponent component) throws IOException
    {
        ResponseWriter writer = facesContext.getResponseWriter();

        String clientId = component.getClientId(facesContext);

        writer.startElement(HTML.INPUT_ELEM, component);
        writer.writeAttribute(HTML.ID_ATTR, clientId, null);
        writer.writeAttribute(HTML.NAME_ATTR, clientId, null);
        
        //allow extending classes to modify html input element's type
        String inputHtmlType = getInputHtmlType(component);
        writer.writeAttribute(HTML.TYPE_ATTR, inputHtmlType, null);

        renderValue(facesContext, component, writer);

        Map<String, List<ClientBehavior>> behaviors = null;
        if (component instanceof ClientBehaviorHolder)
        {
            behaviors = ((ClientBehaviorHolder) component).getClientBehaviors();
            
            long commonPropertiesMarked = 0L;
            if (isCommonPropertiesOptimizationEnabled(facesContext))
            {
                commonPropertiesMarked = CommonPropertyUtils.getCommonPropertiesMarked(component);
            }
            if (behaviors.isEmpty() && isCommonPropertiesOptimizationEnabled(facesContext))
            {
                CommonPropertyUtils.renderChangeEventProperty(writer, 
                        commonPropertiesMarked, component);
                CommonPropertyUtils.renderEventProperties(writer, 
                        commonPropertiesMarked, component);
                CommonPropertyUtils.renderFieldEventPropertiesWithoutOnchange(writer, 
                        commonPropertiesMarked, component);
            }
            else
            {
                HtmlRendererUtils.renderBehaviorizedOnchangeEventHandler(facesContext, writer, component, behaviors);
                if (isCommonEventsOptimizationEnabled(facesContext))
                {
                    Long commonEventsMarked = CommonEventUtils.getCommonEventsMarked(component);
                    CommonEventUtils.renderBehaviorizedEventHandlers(facesContext, writer, 
                            commonPropertiesMarked, commonEventsMarked, component, behaviors);
                    CommonEventUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange(
                        facesContext, writer, commonPropertiesMarked, commonEventsMarked, component, behaviors);
                }
                else
                {
                    HtmlRendererUtils.renderBehaviorizedEventHandlers(facesContext, writer, component, behaviors);
                    HtmlRendererUtils.renderBehaviorizedFieldEventHandlersWithoutOnchange(
                            facesContext, writer, component, behaviors);
                }
            }
            if (isCommonPropertiesOptimizationEnabled(facesContext))
            {
                CommonPropertyUtils.renderInputPassthroughPropertiesWithoutDisabledAndEvents(writer, 
                        commonPropertiesMarked, component);
            }
            else
            {
                HtmlRendererUtils.renderHTMLAttributes(writer, component, 
                        HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED_AND_EVENTS);
            }
        }
        else
        {
            if (isCommonPropertiesOptimizationEnabled(facesContext))
            {
                CommonPropertyUtils.renderInputPassthroughPropertiesWithoutDisabled(writer, 
                        CommonPropertyUtils.getCommonPropertiesMarked(component), component);
            }
            else
            {
                HtmlRendererUtils.renderHTMLAttributes(writer, component, 
                        HTML.INPUT_PASSTHROUGH_ATTRIBUTES_WITHOUT_DISABLED);
            }
        }

        if (isDisabled(facesContext, component))
        {
            writer.writeAttribute(HTML.DISABLED_ATTR, Boolean.TRUE, null);
        }

        if (isAutocompleteOff(facesContext, component))
        {
            writer.writeAttribute(HTML.AUTOCOMPLETE_ATTR, AUTOCOMPLETE_VALUE_OFF, HTML.AUTOCOMPLETE_ATTR);
        }
    }