@Override
public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException {
ExternalContext externalContext = facesContext.getExternalContext();
ResourceVerifier resourceVerifier = ResourceVerifierFactory.getResourceVerifierInstance(externalContext);
if (resourceVerifier.isDependencySatisfied(facesContext, uiComponent)) {
if (logger.isDebugEnabled()) {
Map<String, Object> componentResourceAttributes = uiComponent.getAttributes();
logger.debug(
"Resource dependency already satisfied: name=[{0}] library=[{1}] rendererType=[{2}] value=[{3}] className=[{4}]",
componentResourceAttributes.get("name"), componentResourceAttributes.get("library"),
uiComponent.getRendererType(), getComponentValue(uiComponent), uiComponent.getClass().getName());
}
}
else {
super.encodeBegin(facesContext, uiComponent);
}
}