return;
controllers.clear();
List<Field> fields = new ReflectionFieldProvider().getProperties(source.get());
List<Element> elements = new LinkedList<Element>();
for (Field field : fields) {
Element element = null;
if (Property.class.isAssignableFrom(field.getType())) {
element = new PropertyFieldElement(field);
((PropertyFieldElement) element).sourceProperty().bind(source);
} else if (ReadOnlyPropertyFieldElement.class.isAssignableFrom(field.getType())) {
element = new ReadOnlyPropertyFieldElement(field);
((ReadOnlyPropertyFieldElement) element).sourceProperty().bind(source);
}
if (element != null) {
elements.add(element);
}
}
for (FieldFilter filter : filters) {
try {
elements = filter.filter(elements);
} catch (FilterException e) {
throw new FormException("Something went wrong happened while applying " + filter + ":\n" + e.getMessage(), e);
}
}
for (Element element : elements) {
ElementController controller = null;
if (PropertyFieldElement.class.isAssignableFrom(element.getClass())) {
controller = new PropertyElementController(this, (PropertyElement) element);
} else {
controller = new ElementController(this, element);
}
if (controller != null) {