Package org.richfaces.shrinkwrap.descriptor

Examples of org.richfaces.shrinkwrap.descriptor.FaceletAsset


        browser.get(contextPath.toExternalForm() + "index.jsf");
        guardAjax(button).click();
    }

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

        p.body("<h:form id='myForm'>");
        p.body("<rich:togglePanel id='fieldsPanel' activeItem='closed'> ");
        p.body("    <rich:togglePanelItem name='closed'> ");
        p.body("        <h:commandButton value='Show fields' styleClass='submit'> ");
        p.body("            <rich:toggleControl targetItem='checkboxes' /> ");
        p.body("        </h:commandButton> ");
        p.body("    </rich:togglePanelItem> ");
        p.body("    <rich:togglePanelItem name='checkboxes'> ");
        p.body("        Lorem ipsum dolor sit amet, ... ");
        p.body("    </rich:togglePanelItem> ");
        p.body("</rich:togglePanel> ");
        p.body("</h:form>");

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


        assertEquals("title updated", "script executed", browser.getTitle());
    }

    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:commandButton value='Render All' render='@all' onclick='RichFaces.ajax(this, event, {\"incId\": \"1\"}); return false;' />");

        p.form("<div id='counter'>#{counterBean.state}</div>");

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

        return deployment.getFinalArchive();
    }

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

        p.head("<title>Test for EhCache</title>");
        p.form("<h:outputText id='msg' value='#{ehCacheBean.cacheValue}' />");

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

        assertEquals("xyz", input.getAttribute("value"));
    }

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

        p.form("<h:inputText id='input' value='xyz'><a4j:ajax /></h:inputText>");

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

                .key("part1.js").value("aggregated.js")
                .key("part2.js").value("aggregated.js");

        EmptyAsset emptyResource = EmptyAsset.INSTANCE;

        FaceletAsset relocationPage = new FaceletAsset().head("<h:outputStylesheet name=\"original.css\" />");

        FaceletAsset aggregationPage = new FaceletAsset().head("<h:outputStylesheet name=\"part1.css\" />"
                + "<h:outputStylesheet name=\"part2.css\" />");

        FaceletAsset javaScriptAggregationPage = new FaceletAsset().head("<h:outputScript name=\"part1.js\" />"
                + "<h:outputScript name=\"part2.js\" />");

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

        assertEquals(IllegalStateException.class.toString(), errorName);
        assertTrue(errorMessage.contains("this should be handled by JSF"));
    }

    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'>");
        p.form("        <f:ajax />");
        p.form("    </h:commandButton>");
        p.form("</h:panelGroup>");

        PartialResponseTestingHelper.addPartialResponseInterceptorToPage(p);

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

        assertEquals("j_id1:javax.faces.ViewState:0", update.getAttribute("id"));
        assertEquals("stateless", update.getTextContent());
    }

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

        p.stateless(true);

        p.body("<h:form id='form' prependId='false'>");

        p.body("<h:commandButton id='jsfAjax' value='JSF AJAX' oncomplete='document.title = \"completed\"'><f:ajax render='@none' /></h:commandButton>");
        p.body("<h:commandButton id='richfacesAjax' value='RichFaces AJAX'><a4j:ajax render='@none' /></h:commandButton>");

        p.body("</h:form>");

        PartialResponseTestingHelper.addPartialResponseInterceptorToPage(p);

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

    public static CoreDeployment createBasicDeployment(Class<?> testClass) {

        CoreDeployment deployment = new CoreDeployment(testClass);
        deployment.withA4jComponents();
       
        FaceletAsset p = new FaceletAsset();
        p.body("<script>document.title = 'waiting-for-message'; RichFaces.Push.logLevel = \"debug\";</script>");
        p.body("<a4j:push address=\"" + Commons.TOPIC + "\" ondataavailable=\"console.log('a4j:push message: ' + event.rf.data); document.title = 'message-received: ' + event.rf.data\" />");

        deployment.addMavenDependency(
                "org.atmosphere:atmosphere-runtime");

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

    }



    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='form'>");
        p.body("    <h:inputText value='#{viewScope.value}' />");
        p.body("    <h:commandButton value='Submit' execute='@form' render='@form' onclick='RichFaces.ajax(this, event, {\"incId\": \"1\"}); return false;' />");
        p.body("</h:form>");

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

        assertEquals("j_id1:javax.faces.ViewState:0", update.getAttribute("id"));
        assertEquals("stateless", update.getTextContent());
    }

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

        p.stateless(true);

        p.body("<h:form id='form' prependId='false'>");

        p.body("<h:commandButton id='jsfAjax' value='JSF AJAX' oncomplete='document.title = \"completed\"'><f:ajax render='@none' /></h:commandButton>");
        p.body("<h:commandButton id='richfacesAjax' value='RichFaces AJAX'><a4j:ajax render='@none' /></h:commandButton>");

        p.body("</h:form>");

        PartialResponseTestingHelper.addPartialResponseInterceptorToPage(p);

        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.