Package org.richfaces.shrinkwrap.descriptor

Examples of org.richfaces.shrinkwrap.descriptor.FaceletAsset


    @Deployment
    public static WebArchive createDeployment() {

        RichDeployment deployment = new RichDeployment(ITResourceOptimization.class);

        FaceletAsset p = deployment.baseFacelet("script.xhtml");
        p.head("<h:outputScript library='javax.faces' name='jsf.js' />");
        p.head("<h:outputScript library='org.richfaces' name='jquery.js' />");
        p.head("<h:outputScript library='org.richfaces' name='richfaces.js' />");

        p = deployment.baseFacelet("stylesheet.xhtml");
        p.head("<h:outputStylesheet library='org.richfaces' name='log.ecss' />");

        deployment.webXml(new Function<WebAppDescriptor, WebAppDescriptor>() {
            public WebAppDescriptor apply(WebAppDescriptor input) {

                List<ParamValueType<WebAppDescriptor>> allContextParam = input.getAllContextParam();
View Full Code Here


        waitAjax().until().element(body).text().contains("Redirected");
    }

    private static void addIndexPage(RichDeployment deployment) {
        FaceletAsset p = new FaceletAsset();

        p.head("<h:outputScript name='jsf.js' library='javax.faces' />");
        p.head("<h:outputScript library='org.richfaces' name='jquery.js' />");
        p.head("<h:outputScript library='org.richfaces' name='richfaces.js' />");

        p.form("<h:panelGroup id='panel'>");
        p.form("    <h:commandButton id='button' action='redirected?faces-redirect=true'>");
        p.form("        <f:ajax />");
        p.form("    </h:commandButton>");
        p.form("</h:panelGroup>");

        deployment.archive().addAsWebResource(p, "index.xhtml");
    }
View Full Code Here

        RichDeployment deployment = new RichDeployment(ITResourceMapperService.class);

        EmptyAsset emptyResource = EmptyAsset.INSTANCE;

        FaceletAsset page = new FaceletAsset().head("<h:outputStylesheet name='stylesheet.css' library='some.library' />"
                + "<h:outputStylesheet name='stylesheet.css' library='another.library' />");

        deployment.archive()
                /** classes */
                .addPackage(ResourceHandlerImpl.class.getPackage())
View Full Code Here

        deployment.archive().addAsWebResource(p, "index.xhtml");
    }

    private static void addRedirectedPage(RichDeployment deployment) {
        FaceletAsset p = new FaceletAsset();

        p.body("Redirected");

        deployment.archive().addAsWebResource(p, "redirected.xhtml");
    }
View Full Code Here

        guardAjax(buttonLimitRender).click();
        assertThat(panel.getText(), equalTo("1"));
    }

    private static void addIndexPage(RichDeployment deployment) {
        FaceletAsset p = new FaceletAsset();

        p.form("<a4j:commandButton id='button' render='@this' />");
        p.form("<a4j:commandButton id='buttonLimitRender' render='@this' limitRender='true' />");

        p.form("<a4j:outputPanel id='panel' ajaxRendered='true'>");
        p.form("    #{counterBean.incrementAndGet()}");
        p.form("</a4j:outputPanel>");

        deployment.archive().addAsWebResource(p, "index.xhtml");
    }
View Full Code Here

        assertEquals("eAFjZGBkZOBm!P-f8f-n70Bi37UfDEwAUQgJhA__", parameters.get("db"));
        assertEquals("org.richfaces.images", parameters.get("ln"));
    }

    private static void addIndexPage(RichDeployment deployment) {
        FaceletAsset p = new FaceletAsset();
        p.form("<rich:panel id='panel' header='Header Text'>Some content ");
        p.form("    <h:inputText id='input' /> ");
        p.form("</rich:panel> ");
        p.form("<h:commandButton id='buttonDefault' value = 'Some Button' /> ");
        deployment.archive().addAsWebResource(p, "index.xhtml");
    }
View Full Code Here

        String expectedUrl = "none";
        Assert.assertEquals(expectedUrl, buttonDefault.getCssValue("background-image"));
    }

    private static void addIndexPage(RichDeployment deployment) {
        FaceletAsset p = new FaceletAsset();
        p.form("<rich:panel id='panel' header='Header Text'>Some content ");
        p.form("    <h:inputText id='input' /> ");
        p.form("</rich:panel> ");
        p.form("<h:commandButton id='buttonDefault' value = 'Some Button' /> ");
        deployment.archive().addAsWebResource(p, "index.xhtml");
    }
View Full Code Here

        guardAjax(button).click();
        assertThat(panel.getText(), equalTo("2"));
    }

    private static void addIndexPage(RichDeployment deployment) {
        FaceletAsset p = new FaceletAsset();

        p.form("<a4j:commandButton id='button' render='panel@activeItem' />");

        p.form("<rich:togglePanel id='panel' activeItem='item1'>");
        p.form("    <rich:togglePanelItem name='item1'>");
        p.form("        #{counterBean.incrementAndGet()}");
        p.form("    </rich:togglePanelItem>");
        p.form("</rich:togglePanel>");

        deployment.archive().addAsWebResource(p, "index.xhtml");
    }
View Full Code Here

        assertEquals("first form input should be 2", "2", firstForm.getInput());
        assertEquals("second form input should be 2", "2", secondForm.getInput());
    }

    private static void addIndexPage(RichDeployment deployment) {
        FaceletAsset p = new FaceletAsset();

        p.head("<h:outputScript name='jsf.js' library='javax.faces' />");
        p.head("<h:outputScript library='org.richfaces' name='jquery.js' />");
        p.head("<h:outputScript library='org.richfaces' name='richfaces.js' />");

        p.body("<h:form id='firstForm'>");
        p.body("    <h:inputText value='#{value}' />");
        p.body("    <h:commandButton value='Submit 1' execute='@form' render='@form :secondForm' onclick='RichFaces.ajax(this, event, {\"incId\": \"1\"}); return false;' />");
        p.body("</h:form>");

        p.body("<h:form id='secondForm'>");
        p.body("    <h:inputText value='#{value}' />");
        p.body("    <h:commandButton value='Submit 2' execute='@form' render='@form :firstForm' onclick='RichFaces.ajax(this, event, {\"incId\": \"1\"}); return false;'  />");
        p.body("</h:form>");

        deployment.archive().addAsWebResource(p, "index.xhtml");
    }
View Full Code Here

        Assert.assertEquals("Container height", "200px", container.getCssValue("height"));
        Assert.assertEquals("Shadow height", "200px", shadow.getCssValue("height"));
    }

    private static void addIndexPage(RichDeployment deployment) {
        FaceletAsset p = new FaceletAsset();

        p.body("<h:form id='myForm'>");
        p.body("    <h:commandButton value='Call the popup' class='showButton'> ");
        p.body("        <rich:componentControl target='popup' operation='show' /> ");
        p.body("    </h:commandButton> ");
        p.body("    <rich:popupPanel id='popup' modal='true' resizeable='true' onmaskclick='#{rich:component(\"popup\")}.hide()' > ");
        p.body("        <f:facet name='header'> ");
        p.body("            <h:outputText value='Simple popup panel' /> ");
        p.body("        </f:facet> ");
        p.body("        <f:facet name='controls'> ");
        p.body("            <h:outputLink styleClass='closeLink' value='#' onclick='#{rich:component(\"popup\")}.hide(); return false;'>X</h:outputLink> ");
        p.body("        </f:facet> ");
        p.body("        <p>You can also check and trigger events if the use clicks outside of the panel.</p> ");
        p.body("        <p>In this example clicking outside closes the panel.</p> ");
        p.body("    </rich:popupPanel> ");
        p.body("</h:form>");

        deployment.archive().addAsWebResource(p, "index.xhtml");
    }
View Full Code Here

TOP

Related Classes of org.richfaces.shrinkwrap.descriptor.FaceletAsset

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.