fluid-api/src/main/java/com/fluidbpm/program/api/vo/form/Form.java
@XmlTransient
	public void setFieldValue(String fieldNameParam, Object fieldValueParam, Field.Type typeParam) {
		if (fieldNameParam == null) {
			return;
		}

		if (this.getFormFields() == null || this.getFormFields().isEmpty()) {
			this.setFormFields(new ArrayList());
		}

		String paramLower = fieldNameParam.toLowerCase().trim();

		boolean valueFound = false;

		//Iterate the Form Fields...
		int fieldIndex = 0;
		for (Iterator<Field> fieldIter = this.getFormFields().iterator();
			 fieldIter.hasNext();fieldIndex++) {

			Field field = fieldIter.next();

			String toCheckNameLower = field.getFieldName();
			if (toCheckNameLower == null || toCheckNameLower.trim().isEmpty()) {
				continue;
			}

			toCheckNameLower = toCheckNameLower.trim().toLowerCase();

			if (paramLower.equals(toCheckNameLower)) {
				valueFound = true;
				this.getFormFields().get(fieldIndex).setFieldValue(fieldValueParam);
				this.getFormFields().get(fieldIndex).setTypeAsEnum(typeParam);
				break;
			}
		}

		//Add the value if it wasn't found by name...
		if (!valueFound) {
			this.getFormFields().add(new Field(fieldNameParam, fieldValueParam, typeParam));
		}
	}
@XmlTransient
	public void setFieldValue(String fieldNameParam, Object fieldValueParam, Field.Type typeParam) {
		if (fieldNameParam == null) {
			return;
		}

		if (this.getFormFields() == null || this.getFormFields().isEmpty()) {
			this.setFormFields(new ArrayList());
		}

		String paramLower = fieldNameParam.toLowerCase().trim();

		boolean valueFound = false;

		//Iterate the Form Fields...
		int fieldIndex = 0;
		for (Iterator<Field> fieldIter = this.getFormFields().iterator();
			 fieldIter.hasNext();fieldIndex++) {

			Field field = fieldIter.next();

			String toCheckNameLower = field.getFieldName();
			if (toCheckNameLower == null || toCheckNameLower.trim().isEmpty()) {
				continue;
			}

			toCheckNameLower = toCheckNameLower.trim().toLowerCase();

			if (paramLower.equals(toCheckNameLower)) {
				valueFound = true;
				this.getFormFields().get(fieldIndex).setFieldValue(fieldValueParam);
				this.getFormFields().get(fieldIndex).setTypeAsEnum(typeParam);
				break;
			}
		}

		//Add the value if it wasn't found by name...
		if (!valueFound) {
			this.getFormFields().add(new Field(fieldNameParam, fieldValueParam, typeParam));
		}
	}
@ XmlTransient public void setFieldValue ( String fieldNameParam , Object fieldValueParam , Field . Type typeParam ) { if ( fieldNameParam == null ) { return ; } if ( this . getFormFields ( ) == null || this . getFormFields ( ) . isEmpty ( ) ) { this . setFormFields ( new ArrayList ( ) ) ; } String paramLower = fieldNameParam . toLowerCase ( ) . trim ( ) ; boolean valueFound = false ; //Iterate the Form Fields... int fieldIndex = 0 ; for ( Iterator < Field > fieldIter = this . getFormFields ( ) . iterator ( ) ; fieldIter . hasNext ( ) ; fieldIndex ++ ) { Field field = fieldIter . next ( ) ; String toCheckNameLower = field . getFieldName ( ) ; if ( toCheckNameLower == null || toCheckNameLower . trim ( ) . isEmpty ( ) ) { continue ; } toCheckNameLower = toCheckNameLower . trim ( ) . toLowerCase ( ) ; if ( paramLower . equals ( toCheckNameLower ) ) { valueFound = true ; this . getFormFields ( ) . get ( fieldIndex ) . setFieldValue ( fieldValueParam ) ; this . getFormFields ( ) . get ( fieldIndex ) . setTypeAsEnum ( typeParam ) ; break ; } } //Add the value if it wasn't found by name... if ( ! valueFound ) { this . getFormFields ( ) . add ( new Field ( fieldNameParam , fieldValueParam , typeParam ) ) ; } }
<p>
Sets the value of the {@code fieldNameParam} requested.

<p>
If there is an existing value, the value will be override with
the value of {@code fieldValueParam}.

<p>
The {@code fieldNameParam} <b>is not</b> case sensitive.

<br>

<p>
The value won't be set if;
<ul>
<li>{@code fieldNameParam} is {@code null} or empty.</li>
<li>{@code getFormFields()} is {@code null} or empty.</li>
<li>Field is not found by {@code fieldNameParam}.</li>
</ul>

@param fieldNameParam The name of the Form Field as in Fluid.
@param fieldValueParam The value of the {@code Field}.
@param typeParam The {@code Field.Type} of {@code Field}.

@see Field.Type
<p > Sets the value of the { @code fieldNameParam } requested .