@Deployment public static WebArchive createDeployment() { CoreDeployment deployment = new CoreDeployment(ITActivatorComponentNotRenderedProcessing.class); deployment.withWholeCore(); addIndexPage(deployment); return deployment.getFinalArchive(); }
@Deployment public static WebArchive createDeployment() { CoreDeployment deployment = new CoreDeployment(ITMultipleFormUpdate.class); deployment.withWholeCore(); addIndexPage(deployment); return deployment.getFinalArchive(); }
@Deployment(testable = false) public static WebArchive createDeployment() { CoreDeployment deployment = new CoreDeployment(ITImplicitAjaxOutputRendering.class); deployment.withWholeCore(); deployment.archive().addClasses(CounterBean.class); addIndexPage(deployment); return deployment.getFinalArchive(); }
private static void addIndexPage(CoreDeployment deployment) { FaceletAsset p = new FaceletAsset(); p.form("<r:commandButton id='button' render='@this' />"); p.form("<r:commandButton id='buttonLimitRender' render='@this' limitRender='true' />"); p.form("<r:outputPanel id='panel' ajaxRendered='true'>"); p.form(" #{counterBean.incrementAndGet()}"); p.form("</r:outputPanel>"); deployment.archive().addAsWebResource(p, "index.xhtml"); }
@Deployment public static WebArchive createDeployment() { CoreDeployment deployment = createBasicDeployment(ITPushFilterWithoutWarp.class); deployment.webXml( new Function<WebAppDescriptor, WebAppDescriptor>() { public WebAppDescriptor apply(WebAppDescriptor webXml) { return webXml .createFilter() .filterName(PushFilter.class.getSimpleName()) .filterClass(PushFilter.class.getName()) .asyncSupported(true) .up() .createFilterMapping() .filterName(PushFilter.class.getSimpleName()) .servletName(FacesServlet.class.getSimpleName()) .up(); } }); return deployment.getFinalArchive(); }
private static void addIndexPage(CoreDeployment deployment) { FaceletAsset p = new FaceletAsset(); p.head("<h:outputScript name='jsf.js' library='javax.faces' />"); p.head("<h:outputScript name='jquery.js' />"); p.head("<h:outputScript name='richfaces.js' />"); p.form("<h:panelGroup id='panel'>"); p.form( " <h:commandButton id='button' onclick='RichFaces.ajax(this, event, {}); return false;' render='panel output' oncomplete='window.oncompleteEvaluated = true' rendered='#{!facesContext.postback}' />"); p.form("</h:panelGroup>"); p.form( "<h:panelGroup id='output'>#{facesContext.postback ? 'postback' : 'initial'}</h:panelGroup>"); deployment.archive().addAsWebResource(p, "index.xhtml"); }
private static void addIndexPage(CoreDeployment deployment) { FaceletAsset p = new FaceletAsset(); p.head("<h:outputScript name='jsf.js' library='javax.faces' />"); p.head("<h:outputScript name='jquery.js' />"); p.head("<h:outputScript 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"); }