Map<String, Map<String, List<String>>> result = new HashMap<String, Map<String, List<String>>>();
for (FieldError err : bindStatus.getErrors().getFieldErrors()) {
//attempt to look up which tab the field error is on. If it can't be found, just use
//the default tab for the group
String tabName = EntityForm.DEFAULT_TAB_NAME;
Tab tab = form.findTabForField(err.getField());
if (tab != null) {
tabName = tab.getTitle();
}
Map<String, List<String>> tabErrors = result.get(tabName);
if (tabErrors == null) {
tabErrors = new HashMap<String, List<String>>();