Search in sources :

Example 6 with MockRenderKit

use of com.sun.faces.mock.MockRenderKit in project mojarra by eclipse-ee4j.

the class FacesServletTestCase method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    // Set up Servlet API Objects
    servletContext.addInitParameter("appParamName", "appParamValue");
    servletContext.setAttribute("appScopeName", "appScopeValue");
    session.setAttribute("sesScopeName", "sesScopeValue");
    request.setAttribute("reqScopeName", "reqScopeValue");
    UIViewRoot root = facesContext.getApplication().getViewHandler().createView(facesContext, null);
    root.setViewId("/viewId");
    facesContext.setViewRoot(root);
    RenderKitFactory renderKitFactory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
    RenderKit renderKit = new MockRenderKit();
    try {
        renderKitFactory.addRenderKit(RenderKitFactory.HTML_BASIC_RENDER_KIT, renderKit);
    } catch (IllegalArgumentException e) {
    }
}
Also used : MockRenderKit(com.sun.faces.mock.MockRenderKit) RenderKit(jakarta.faces.render.RenderKit) UIViewRoot(jakarta.faces.component.UIViewRoot) MockRenderKit(com.sun.faces.mock.MockRenderKit) RenderKitFactory(jakarta.faces.render.RenderKitFactory)

Aggregations

MockRenderKit (com.sun.faces.mock.MockRenderKit)6 RenderKit (jakarta.faces.render.RenderKit)6 RenderKitFactory (jakarta.faces.render.RenderKitFactory)6 UIViewRoot (jakarta.faces.component.UIViewRoot)2 CompositeSearchKeywordResolver (com.sun.faces.component.search.CompositeSearchKeywordResolver)1 SearchExpressionContextFactoryImpl (com.sun.faces.component.search.SearchExpressionContextFactoryImpl)1 SearchExpressionHandlerImpl (com.sun.faces.component.search.SearchExpressionHandlerImpl)1 SearchKeywordResolverImplAll (com.sun.faces.component.search.SearchKeywordResolverImplAll)1 SearchKeywordResolverImplChild (com.sun.faces.component.search.SearchKeywordResolverImplChild)1 SearchKeywordResolverImplComposite (com.sun.faces.component.search.SearchKeywordResolverImplComposite)1 SearchKeywordResolverImplForm (com.sun.faces.component.search.SearchKeywordResolverImplForm)1 SearchKeywordResolverImplId (com.sun.faces.component.search.SearchKeywordResolverImplId)1 SearchKeywordResolverImplNamingContainer (com.sun.faces.component.search.SearchKeywordResolverImplNamingContainer)1 SearchKeywordResolverImplNext (com.sun.faces.component.search.SearchKeywordResolverImplNext)1 SearchKeywordResolverImplNone (com.sun.faces.component.search.SearchKeywordResolverImplNone)1 SearchKeywordResolverImplParent (com.sun.faces.component.search.SearchKeywordResolverImplParent)1 SearchKeywordResolverImplPrevious (com.sun.faces.component.search.SearchKeywordResolverImplPrevious)1 SearchKeywordResolverImplRoot (com.sun.faces.component.search.SearchKeywordResolverImplRoot)1 SearchKeywordResolverImplThis (com.sun.faces.component.search.SearchKeywordResolverImplThis)1 VisitContextFactoryImpl (com.sun.faces.component.visit.VisitContextFactoryImpl)1