@Override
public void encodeEnd(FacesContext facesContext, UIComponent component)
throws IOException {
ResponseWriter responseWriter = facesContext.getResponseWriter();
BridgeComponent bridgeComponent = (BridgeComponent) component;
renderXFC(facesContext, bridgeComponent);
renderJSInclude(facesContext, bridgeComponent,
KitConstants.XFBRIDGE_JS_FILE_PARENT_DIR,
"logger.js");
renderJSInclude(facesContext, bridgeComponent,
KitConstants.XFBRIDGE_JS_FILE_PARENT_DIR,
KitConstants.XFBRIDGE_JS_FILE_NAME);
Boolean debug = bridgeComponent.getDebug();
if (debug != null) {
if (debug.booleanValue()) {
responseWriter.startElement("script", bridgeComponent);
responseWriter.writeAttribute("type", "application/x-javascript", "type");
responseWriter.write("XUL_FACES_BRIDGE.logger.setLevelWriter(Logger.DEBUG_LEVEL, new AlertWriter());");