/** * @param renderKitId * @see javax.faces.component.UIViewRoot#setRenderKitId(java.lang.String) */ public void setRenderKitId(String renderKitId) { original.setRenderKitId(renderKitId); }
/** * This template method called from the {@link #setupFacesRequest()} to create components view tree in the virtual request. * The default implementation is only creates {@link UIViewRoot} instance for view ID "/test.xhtml". * @return */ protected UIViewRoot setupView() { UIViewRoot viewRoot = (UIViewRoot) application.createComponent(UIViewRoot.COMPONENT_TYPE); viewRoot.setViewId("/test.xhtml"); viewRoot.setLocale(Locale.getDefault()); viewRoot.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); return viewRoot; }
/** * This template method called from the {@link #setupFacesRequest()} to create components view tree in the virtual request. * The default implementation is only creates {@link UIViewRoot} instance for view ID "/test.xhtml". * @return */ protected UIViewRoot setupView() { UIViewRoot viewRoot = (UIViewRoot) application.createComponent(UIViewRoot.COMPONENT_TYPE); viewRoot.setViewId("/test.xhtml"); viewRoot.setLocale(Locale.getDefault()); viewRoot.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); return viewRoot; }
/** * By default, create an instance of UIViewRoot, set its viewId as "/viewId" * and assign it to the current facesContext. * * @throws Exception */ protected void setUpView() throws Exception { UIViewRoot root = new UIViewRoot(); root.setViewId("/viewId"); root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); facesContext.setViewRoot(root); }
/** * By default, create an instance of UIViewRoot, set its viewId as "/viewId" * and assign it to the current facesContext. * * @throws Exception */ protected void setUpView() throws Exception { UIViewRoot root = new UIViewRoot(); root.setViewId("/viewId"); root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); facesContext.setViewRoot(root); }
/** * By default, create an instance of UIViewRoot, set its viewId as "/viewId" * and assign it to the current facesContext. * * @throws Exception */ protected void setUpView() throws Exception { UIViewRoot root = new UIViewRoot(); root.setViewId("/viewId"); root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); facesContext.setViewRoot(root); }
/** * By default, create an instance of UIViewRoot, set its viewId as "/viewId" * and assign it to the current facesContext. * * @throws Exception */ protected void setUpView() throws Exception { UIViewRoot root = new UIViewRoot(); root.setViewId("/viewId"); root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); facesContext.setViewRoot(root); }
/** * By default, create an instance of UIViewRoot, set its viewId as "/viewId" * and assign it to the current facesContext. * * @throws Exception */ protected void setUpView() throws Exception { UIViewRoot root = new UIViewRoot(); root.setViewId("/viewId"); root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); facesContext.setViewRoot(root); }
/** * By default, create an instance of UIViewRoot, set its viewId as "/viewId" * and assign it to the current facesContext. * * @throws Exception */ protected void setUpView() throws Exception { UIViewRoot root = new UIViewRoot(); root.setViewId("/viewId"); root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); facesContext.setViewRoot(root); }
/** * By default, create an instance of UIViewRoot, set its viewId as "/viewId" * and assign it to the current facesContext. * * @throws Exception */ protected void setUpView() throws Exception { UIViewRoot root = new UIViewRoot(); root.setViewId("/viewId"); root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); facesContext.setViewRoot(root); }
/** * By default, create an instance of UIViewRoot, set its viewId as "/viewId" * and assign it to the current facesContext. * * @throws Exception */ protected void setUpView() throws Exception { UIViewRoot root = new UIViewRoot(); root.setViewId("/viewId"); root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); facesContext.setViewRoot(root); }
/** * By default, create an instance of UIViewRoot, set its viewId as "/viewId" * and assign it to the current facesContext. * * @throws Exception */ protected void setUpView() throws Exception { UIViewRoot root = new UIViewRoot(); root.setViewId("/viewId"); root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); facesContext.setViewRoot(root); }
public MockFacesContext createViewRoot() { viewRoot = new UIViewRoot(); viewRoot.setRenderKitId(getApplication().getViewHandler().calculateRenderKitId(this)); return this; }
public StubFacesContext createViewRoot() { viewRoot = new UIViewRoot(); viewRoot.setRenderKitId(getApplication().getViewHandler().calculateRenderKitId(this)); return this; }
protected void initDefaultView() { UIViewRoot root = new UIViewRoot(); root.setViewId("/viewId"); root.setLocale(getLocale()); root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); this.facesContext.setViewRoot(root); }
protected void restoreComponentState(final FacesContext context, final UIViewRoot viewRoot, final String renderKitId) { assertRenderKitIdNotNull(renderKitId); if (viewRoot.getRenderKitId() == null) { viewRoot.setRenderKitId(renderKitId); } if (isSavingStateInClient(context)) { restoreComponentStateFromClient(context, viewRoot, renderKitId); } else { restoreComponentStateFromServer(context, viewRoot); } }
protected void initDefaultView() { UIViewRoot root = new UIViewRoot(); root.setViewId("/viewId"); root.setLocale(getLocale()); root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); facesContext.setViewRoot(root); }
protected void restoreComponentState(FacesContext context, UIViewRoot viewRoot, String renderKitId) { assertRenderKitIdNotNull(renderKitId); if (viewRoot.getRenderKitId() == null) { viewRoot.setRenderKitId(renderKitId); } if (isSavingStateInClient(context)) { restoreComponentStateFromClient(context, viewRoot, renderKitId); } else { restoreComponentStateFromServer(context, viewRoot); } }
/** * By default, create an instance of UIViewRoot, set its viewId as "/viewId" * and assign it to the current facesContext. * * @throws Exception */ protected void setUpDefaultView() { UIViewRoot root = new UIViewRoot(); root.setViewId("/viewId"); root.setLocale(getLocale()); root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT); facesContext.setViewRoot(root); }
public void testRender() throws Exception { UIViewRoot newRoot = new UIViewRoot(); newRoot.setViewId(VIEW_ID); newRoot.setRenderKitId("HTML_BASIC"); ((MockViewHandler) this.viewHandler).setCreateView(newRoot); this.context.inViewState(); EasyMock.expectLastCall().andReturn(false); EasyMock.replay(new Object[] { this.context }); View view = this.factory.getView(this.context); ((JsfView) view).getViewRoot().setTransient(true); view.render(); assertTrue(newRoot.isTransient()); assertTrue(((NoRenderViewHandler) this.viewHandler).rendered); }