use of com.github.bordertech.wcomponents.util.WhiteSpaceFilterPrintWriter in project wcomponents by BorderTech.
the class WhitespaceFilterInterceptor method paint.
/**
* Paints the component.
*
* @param renderContext the renderContext to send the output to.
*/
@Override
public void paint(final RenderContext renderContext) {
boolean enabled = ConfigurationProperties.getWhitespaceFilter();
if (enabled && renderContext instanceof WebXmlRenderContext) {
PrintWriter writer = ((WebXmlRenderContext) renderContext).getWriter();
writer = new WhiteSpaceFilterPrintWriter(writer);
WebXmlRenderContext filteredContext = new WebXmlRenderContext(writer, UIContextHolder.getCurrent().getLocale());
super.paint(filteredContext);
} else {
super.paint(renderContext);
}
}
Aggregations