private List<InvalidationListener> invalidationListeners = new LinkedList<InvalidationListener>();
public ReadOnlyPropertyElement(Field field) throws FormException {
super(field);
if (!ObservableValue.class.isAssignableFrom(field.getType())) {
throw new FormException("Trying to create an observable element with a non-observable field " + field.getType());
}
valueProperty().addListener(new ChangeListener<ReadOnlyProperty<WrappedType>>() {
public void changed(ObservableValue<? extends ReadOnlyProperty<WrappedType>> observableValue, ReadOnlyProperty<WrappedType> wrappedTypeReadOnlyProperty, ReadOnlyProperty<WrappedType> wrappedTypeReadOnlyProperty1) {
for (InvalidationListener invalidationListener : invalidationListeners) {