if (control instanceof Container) {
// Include fields that are containers
if (control instanceof Field) {
fields.put(control.getName(), control);
}
Container childContainer = (Container) control;
addFields(childContainer, fields);
} else if (control instanceof Field) {
fields.put(control.getName(), control);
}
}