@Deployment(testable = false) public static WebArchive createDeployment() { A4JDeployment deployment = new A4JDeployment(ITJsfAjaxScriptRendering.class); addIndexPage(deployment); deployment.archive().addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml"); return deployment.getFinalArchive(); }
@Deployment(testable = false) public static WebArchive deployment() { A4JDeployment deployment = new A4JDeployment(ITNestedRepeat.class); deployment .archive() .addClasses(NestedDataBean.class) .addAsWebResource( ITNestedRepeat.class.getResource("NestedRepeatTest.xhtml"), "NestedRepeatTest.xhtml") .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml"); return deployment.getFinalArchive(); }
@Deployment(testable = false) public static WebArchive createDeployment() { A4JDeployment deployment = new A4JDeployment(IT_RF12295.class); addIndexPage(deployment); deployment.webXml( new Function<WebAppDescriptor, WebAppDescriptor>() { @Override public WebAppDescriptor apply(@Nullable WebAppDescriptor webXML) { webXML .createContextParam() .paramName("javax.faces.PARTIAL_STATE_SAVING") .paramValue("false") .up(); return webXML; } }); return deployment.getFinalArchive(); }
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"); }
private static void addIndexPage(A4JDeployment deployment) { FaceletAsset p = new FaceletAsset(); p.form("<a4j:outputPanel>"); p.form(" <span></span>"); p.form("</a4j:outputPanel>"); p.form("<a4j:commandButton id=\"button\" value=\"Click me\"/>"); p.form("<a4j:log id=\"log\"/>"); deployment.archive().addAsWebResource(p, "index.xhtml"); }