package de.larmic.butterfaces.component.renderkit.html_basic.resourcelibraries;

import de.larmic.butterfaces.component.html.resourcelibraries.HtmlActivateLibraries;
import de.larmic.butterfaces.component.base.renderer.HtmlDeprecatedBasicRenderer;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.render.FacesRenderer;
import java.io.IOException;

/**
 * Created by larmic on 17.09.14.
 */
@FacesRenderer(componentFamily = HtmlActivateLibraries.COMPONENT_FAMILY, rendererType = HtmlActivateLibraries.RENDERER_TYPE)
public class ActivateLibrariesRenderer extends HtmlDeprecatedBasicRenderer {

    @Override
    public void encodeBegin(final FacesContext context, final UIComponent component) throws IOException {
        rendererParamsNotNull(context, component);

        if (!shouldEncode(component)) {
            return;
        }

        context.getResponseWriter().writeComment("ButterFaces information:\ntag l<:activateLibraries /> is used to enable Bootstrap and jQuery!");
    }

    @Override
    public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
        rendererParamsNotNull(context, component);

        if (!shouldEncode(component)) {
            return;
        }
    }
}

@@ -117,134 +117,124 @@
 ent.
-html.resourcelibraries.HtmlActivateLibraries;%0Aimport de.larmic.butterfaces.component.base.renderer.HtmlDeprecatedBasicRenderer
+base.renderer.HtmlBasicRenderer;%0Aimport de.larmic.butterfaces.component.html.resourcelibraries.HtmlActivateLibraries
 ;%0A%0Ai
@@ -607,18 +607,8 @@
 Html
-Deprecated
 Basi
@@ -752,87 +752,34 @@
     
-rendererParamsNotNull(context, component);%0A%0A        if (!shouldEncode(component
+if (!component.isRendered(
 )) %7B
@@ -966,242 +966,7 @@
    %7D
-%0A%0A    @Override%0A    public void encodeEnd(FacesContext context, UIComponent component) throws IOException %7B%0A        rendererParamsNotNull(context, component);%0A%0A        if (!shouldEncode(component)) %7B%0A            return;%0A        %7D%0A    %7D
 %0A%7D%0A

BUT-389 Convert ActivateLibrariesRenderer.java to HtmlBasicRenderer.java