package de.larmic.butterfaces.component.showcase;

import de.larmic.butterfaces.component.showcase.example.AbstractCodeExample;
import de.larmic.butterfaces.component.showcase.example.XhtmlCodeExample;

import javax.faces.view.ViewScoped;
import javax.inject.Named;
import java.io.Serializable;
import java.util.List;

@Named
@ViewScoped
@SuppressWarnings("serial")
public class ActivateLibrariesShowcase extends AbstractCodeShowcase implements Serializable {

    @Override
    public void buildCodeExamples(final List<AbstractCodeExample> codeExamples) {
        final XhtmlCodeExample xhtmlCodeExample = new XhtmlCodeExample(false);

        xhtmlCodeExample.appendInnerContent("        <b:activateLibraries id=\"input\"");
        xhtmlCodeExample.appendInnerContent("                             rendered=\"" + this.isRendered() + "\">");
        xhtmlCodeExample.appendInnerContent("        </b:activateLibraries>", false);

        codeExamples.add(xhtmlCodeExample);
    }
}

@@ -117,24 +117,99 @@
 odeExample;%0A
+import de.larmic.butterfaces.component.showcase.example.WebXmlCodeExample;%0A
 import de.la
@@ -1043,16 +1043,904 @@
 ample);%0A
+        codeExamples.add(createWebXmlExample());%0A    %7D%0A%0A    private AbstractCodeExample createWebXmlExample() %7B%0A        final WebXmlCodeExample webXmlCodeExample = new WebXmlCodeExample(%22web.xml%22, %22webxml%22);%0A%0A        webXmlCodeExample.appendInnerContent(%22  %3C!-- If you want to enable compressed and minified resources --%3E%22);%0A        webXmlCodeExample.appendInnerContent(%22  %3C!-- (http://yui.github.io/yuicompressor/ is used) --%3E%22);%0A        webXmlCodeExample.appendInnerContent(%22  %3C!-- default is false --%3E%22);%0A        webXmlCodeExample.appendInnerContent(%22  %3Ccontext-param%3E%22);%0A        webXmlCodeExample.appendInnerContent(%22     %3Cparam-name%3Ede.larmic.butterfaces.useCompressedResources%3C/param-name%3E%22);%0A        webXmlCodeExample.appendInnerContent(%22     %3Cparam-value%3Etrue%3C/param-value%3E%22);%0A        webXmlCodeExample.appendInnerContent(%22  %3C/context-param%3E%22);%0A%0A        return webXmlCodeExample;%0A
     %7D%0A%7D%0A

update showcase