@Override public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException { super.encodeEnd(facesContext, component); Map<Object, Object> attributes = facesContext.getAttributes(); attributes.remove(RENDERING_HEAD_SECTION_KEY); }
@Override public void encodeEnd(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.encodeEnd(facesContext, uiComponent); } }
@Override public void encodeEnd(FacesContext facesContext, UIComponent uiComponent) throws IOException { boolean ajaxRequest = facesContext.getPartialViewContext().isAjaxRequest(); ResponseWriter responseWriter = facesContext.getResponseWriter(); if (!ajaxRequest) { BodyScriptEncodingResponseWriter bodyScriptEncodingResponseWriter = new BodyScriptEncodingResponseWriter( responseWriter, facesContext); facesContext.setResponseWriter(bodyScriptEncodingResponseWriter); } super.encodeEnd(facesContext, uiComponent); if (!ajaxRequest) { facesContext.setResponseWriter(responseWriter); } }
super.encodeEnd(facesContext, uiComponentResource);