Examples of FaceletAsset


Examples of org.richfaces.shrinkwrap.descriptor.FaceletAsset

    @Deployment
    public static WebArchive createDeployment() {
        RegionTestDeployment deployment = new RegionTestDeployment(ITRegionRichAjax.class);

        FaceletAsset page = deployment.baseFacelet("index.xhtml");
        page.form("<a4j:region id='region'>");
        page.form("    <h:commandButton id='button'>");
        page.form("        <a4j:ajax execute='#{regionBean.execute}' />");
        page.form("    </h:commandButton>");
        page.form("</a4j:region>");

        return deployment.getFinalArchive();
    }
View Full Code Here

Examples of org.richfaces.shrinkwrap.descriptor.FaceletAsset

        cell = browser.findElement(By.id("myForm:input"));
        Assert.assertEquals("4", cell.getAttribute("value"));
    }

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

        p.body("<h:form id='myForm'> ");
        p.body("    <h:inputText id='input' value='#{ajaxBean.value}'> ");
        p.body("        <a4j:ajax listener='#{ajaxBean.listener(\"4\")}' render='@this' /> ");
        p.body("    </h:inputText> ");
        p.body("</h:form> ");

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

Examples of org.richfaces.shrinkwrap.descriptor.FaceletAsset

    private boolean isEmpty(String str) {
        return str == null || str.length() == 0;
    }

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

        p.body("<h:form prependId='false'>");
        p.body("  <a4j:commandButton id=\"buttonEL\" image=\"#{resource['square.jpg']}\" value=\"#{resource['square.jpg']}\" /> ");
        p.body("  <a4j:commandButton id=\"buttonELNoValue\" image=\"#{resource['square.jpg']}\" /> ");
        p.body("  <a4j:commandButton id=\"buttonNoEL\" image=\"resources/square.jpg\" value=\"resources/square.jpg\"/> ");
        p.body("  <h:commandButton id=\"hCommandButton\" image=\"#{resource['square.jpg']}\" value=\"#{resource['square.jpg']}\" />");
        p.body("  <h:commandButton id=\"hCommandButtonNoValue\" image=\"#{resource['square.jpg']}\" />");
        p.body("</h:form>");

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

Examples of org.richfaces.shrinkwrap.descriptor.FaceletAsset

        guardAjax(button).click();
        assertEquals("there should be still just one jsf.js script on the page", 1, jsfJsScripts.size());
    }

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

        p.form("<h:commandLink id='button' value='Click me '>");
        p.form("    <a4j:ajax event='click' render='@form' />");
        p.form("</h:commandLink>");

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

Examples of org.richfaces.shrinkwrap.descriptor.FaceletAsset

    @Deployment
    public static WebArchive createDeployment() {
        RegionTestDeployment deployment = new RegionTestDeployment(ITExecuteJSFAjax.class);

        FaceletAsset page = deployment.baseFacelet("index.xhtml");
        page.form("<h:commandButton id='button'>");
        page.form("    <f:ajax execute='#{regionBean.execute}' />");
        page.form("</h:commandButton>");

        return deployment.getFinalArchive();
    }
View Full Code Here

Examples of org.richfaces.shrinkwrap.descriptor.FaceletAsset

        Graphene.guardAjax(button2).click();
    }

    // from RF-12761
    private static void addIndexPage(A4JDeployment deployment) {
        FaceletAsset p = new FaceletAsset();

        p.body("<h:form id='myForm'> ");
        p.body("    <a4j:jsFunction name='jsFunctionTest' actionListener='#{ajaxBean.methodA}' render=':panel'/> ");
        p.body("    <h:commandButton value='Test' id='jsFunction'> ");
        p.body("        <f:ajax onevent='jsFunctionTest()'/> ");
        p.body("    </h:commandButton> ");
        p.body("</h:form> ");
        p.body("<rich:panel id='panel' > ");
        p.body("    <h:form id='myForm2'> ");
        p.body("        <a4j:commandButton value='OK' actionListener='#{ajaxBean.methodB}' id='ajax2' /> ");
        p.body("    </h:form> ");
        p.body("</rich:panel> ");
        p.body("<rich:messages /> ");
        deployment.archive().addAsWebResource(p, "index.xhtml");
    }
View Full Code Here

Examples of org.richfaces.shrinkwrap.descriptor.FaceletAsset

            }
        }).execute();
    }

    private static void addParamPage(A4JDeployment deployment) {
        FaceletAsset p = new FaceletAsset();

        p.body("<h:form id='myForm'> ");
        p.body("    <a4j:jsFunction name='jsFunctionTest' actionListener='#{ajaxBean.listener}' render='@form'> ");
        p.body("        <a4j:param name='param1' assignTo='#{ajaxBean.longValue}'/> ");
        p.body("    </a4j:jsFunction> ");
        p.body("    <a4j:repeat id='repeat' value='#{ajaxBean.nodes}' var='node' rowKeyVar='key' rows='30'> ");
        p.body("        <a4j:outputPanel id='panel' layout='block' onclick='jsFunctionTest(#{key});'> ");
        p.body("            <h:outputText value='#{node.label}  key: #{key}'/> ");
        p.body("        </a4j:outputPanel> ");
        p.body("    </a4j:repeat> ");
        p.body("    <rich:messages /> ");
        p.body("</h:form> ");
        deployment.archive().addAsWebResource(p, "param.xhtml");
    }
View Full Code Here

Examples of org.richfaces.shrinkwrap.descriptor.FaceletAsset

        input = browser.findElement(By.id("myForm:input"));
        Assert.assertEquals("0", input.getAttribute("value"));
    }

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

        p.body("<h:form id='myForm'> ");
        p.body("    <h:inputText id='input' value='#{ajaxBean.value}'/> ");
        p.body("    <h:commandButton id='submit' value = 'Submit Input'> ");
        p.body("        <f:ajax execute='input' render='input' /> ");
        p.body("    </h:commandButton> ");
        p.body("    <h:commandButton id='clear' value = 'Clear Input'> ");
        p.body("        <f:ajax listener='#{ajaxBean.clearValue}' render='input' /> ");
        p.body("    </h:commandButton> ");
        p.body("</h:form> ");

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

Examples of org.richfaces.shrinkwrap.descriptor.FaceletAsset

        waitAjax().until().element(firstAfterUploadClearLink).is().visible();
    }

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

        p.body("<script type='text/javascript'>");
        p.body("    jsf.ajax.addOnError(function(e) {");
        p.body("        console.log(e);");
        p.body("    });");
        p.body("</script>");
        p.body("<h:form>");
        p.body("    <rich:fileUpload fileUploadListener='#{fileUploadBean.listener}' />");
        p.body("</h:form>");

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

Examples of org.richfaces.shrinkwrap.descriptor.FaceletAsset

        browser.get(contextPath.toExternalForm());
        tabTestHelper.check_row_removal(tabPanel, a4jCreateTabButton);
    }

    private static void addIndexPage(RichDeployment deployment) {
        FaceletAsset p = new FaceletAsset();
        p.body("<h:form id='myForm'>");
        p.body("<rich:tabPanel id='tabPanel'>");
        p.body("    <rich:tab id='tab0' name='tab0' header='tab0 header'>content of tab 0</rich:tab>");
        p.body("    <rich:tab id='tab1' name='tab1' header='tab1 header' disabled='true'>content of tab 1</rich:tab>");
        p.body("    <rich:tab id='tab2' name='tab2' header='tab2 header'>content of tab 2</rich:tab>");
        p.body("    <c:forEach items='#{tabPanelBean.tabBeans}' var='newTab'>");
        p.body("        <rich:tab id='#{newTab.tabId}' name='#{newTab.tabName}' render='tabPanel'>");
        p.body("            <f:facet name='header'>");
        p.body("                <h:outputText value='#{newTab.tabHeader} ' />");
        p.body("                <h:commandLink value='[x]' rendered='#{newTab.closable}' onclick='var event = arguments[0] || window.event; removeTab(\"#{newTab.tabId}\"); event.stopPropagation(); return false;' />");
        p.body("            </f:facet>");
        p.body("            #{newTab.tabContentText}");
        p.body("        </rich:tab>");
        p.body("    </c:forEach>");

        p.body("</rich:tabPanel> ");

        p.body("<a4j:jsFunction id='jsFunction' name='removeTab' action='#{tabPanelBean.removeTab}' render='myForm:tabPanel' >");
        p.body("    <a4j:param name='removeTabId'/>");
        p.body("</a4j:jsFunction>");

        p.body("<a4j:commandButton id='a4jCreateTabButton' value='[a4j] Create tab' render='tabPanel' actionListener='#{tabPanelBean.generateNewTab}' />");
        p.body("</h:form>");

        deployment.archive().addAsWebResource(p, "index.xhtml");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.