mvvmfx/src/main/java/de/saxsys/mvvmfx/utils/mapping/ModelWrapper.java
public void commit() {
		if (model.get() != null) {

			inCommitPhase = true;

			fields.forEach(field -> field.commit(model.get()));

			if(! immutableFields.isEmpty()) {

				M tmp = model.get();

				for (ImmutablePropertyField<?, M, ?> immutableField : immutableFields) {
					tmp = immutableField.commitImmutable(tmp);
				}

				model.set(tmp);

			}

			inCommitPhase = false;



			dirtyFlag.set(false);

			calculateDifferenceFlag();
		}
	}
public void commit() {
		if (model.get() != null) {

			inCommitPhase = true;

			fields.forEach(field -> field.commit(model.get()));

			if(! immutableFields.isEmpty()) {

				M tmp = model.get();

				for (ImmutablePropertyField<?, M, ?> immutableField : immutableFields) {
					tmp = immutableField.commitImmutable(tmp);
				}

				model.set(tmp);

			}

			inCommitPhase = false;



			dirtyFlag.set(false);

			calculateDifferenceFlag();
		}
	}
public void commit ( ) { if ( model . get ( ) != null ) { inCommitPhase = true ; fields . forEach ( field -> field . commit ( model . get ( ) ) ) ; if ( ! immutableFields . isEmpty ( ) ) { M tmp = model . get ( ) ; for ( ImmutablePropertyField < ? , M , ? > immutableField : immutableFields ) { tmp = immutableField . commitImmutable ( tmp ) ; } model . set ( tmp ) ; } inCommitPhase = false ; dirtyFlag . set ( false ) ; calculateDifferenceFlag ( ) ; } }
Take the current value of each property field and write it into the wrapped model element.
<p>
If no model element is defined then nothing will happen.
<p>
<b>Note:</b> This method has no effects on the values of the defined property fields but will only change the
state of the wrapped model element.
Take the current value of each property field and write it into the wrapped model element . <p > If no model element is defined then nothing will happen . <p > <b > Note : < / b > This method has no effects on the values of the defined property fields but will only change the state of the wrapped model element .