GenericFormElement element = (GenericFormElement) entry.getValue();
String elementId = (String) entry.getKey();
if (element instanceof FormElement) {
Data data = ((FormElement) element).getData();
if (data != null) {
result.put(elementId, data.getValue());
}
}
else if (element instanceof FormWidget) {
MapFormReader subMapReader = new MapFormReader((FormWidget) element);
result.put(elementId, subMapReader.getMap());