static protected <VL extends ValidationListener> void validateMapInContext(ValidationContext<VL> context, ValidateCallback s) {
// jsr303 spec: For Map, the value of each Map.Entry is validated (key
// is not validated).
Map<?, ?> currentBean = (Map<?, ?>) context.getBean();
MetaBean metaBean = context.getMetaBean();
final DynamicMetaBean dyn = getDynamicMetaBean(context);
context.setCurrentKey(null);
try {
for (Map.Entry<?, ?> entry : currentBean.entrySet()) {
Object value = entry.getValue();
if (value == null) {
continue;
}
context.setCurrentKey(entry.getKey());
if (dyn == null) {
context.setBean(value);
} else {
context.setBean(value, dyn.resolveMetaBean(value));
}
s.validate();
}
} finally {
context.moveUp(currentBean, metaBean);