String componentId = component.getClientId(getFacesContext());
ClientValidationSupport cvs;
if (renderToClientValidationSupport.containsKey(componentId)) {
cvs = renderToClientValidationSupport.get(componentId);
} else {
Finder finder = new Finder(component) {
public boolean test(UIComponent component) {
return component instanceof ClientValidationSupport;
}
};
cvs = (ClientValidationSupport) finder.getComponent();
renderToClientValidationSupport.put(componentId, cvs);
}
return cvs;
}