Search in sources :

Example 1 with HtmlTextRenderer

use of org.apache.myfaces.renderkit.html.HtmlTextRenderer in project myfaces by apache.

the class OwnRenderkitTest method setUp.

public void setUp() throws Exception {
    super.setUp();
    addRenderKit();
    inputText = new HtmlInputText();
    writer = new MockResponseWriter(new StringWriter(), null, null);
    facesContext.setResponseWriter(writer);
    MockFacesContext12.getCurrentInstance();
    facesContext.getViewRoot().setRenderKitId("OWN_BASIC");
    facesContext.getRenderKit().addRenderer(inputText.getFamily(), inputText.getRendererType(), new HtmlTextRenderer());
}
Also used : StringWriter(java.io.StringWriter) HtmlInputText(jakarta.faces.component.html.HtmlInputText) MockResponseWriter(org.apache.myfaces.test.mock.MockResponseWriter) HtmlTextRenderer(org.apache.myfaces.renderkit.html.HtmlTextRenderer)

Example 2 with HtmlTextRenderer

use of org.apache.myfaces.renderkit.html.HtmlTextRenderer in project myfaces by apache.

the class ErrorPageWriterTest method setUp.

public void setUp() throws Exception {
    super.setUp();
    outputText = new HtmlOutputText();
    writer = new MockResponseWriter(new StringWriter(), null, null);
    facesContext.setResponseWriter(writer);
    // TODO remove these two lines once myfaces-test goes alpha, see MYFACES-1155
    facesContext.getViewRoot().setRenderKitId(MockRenderKitFactory.HTML_BASIC_RENDER_KIT);
    facesContext.getRenderKit().addRenderer(outputText.getFamily(), outputText.getRendererType(), new HtmlTextRenderer());
    servletContext.setAttribute(StateUtils.SERIAL_FACTORY, new DefaultSerialFactory());
    facesContext.getAttributes().put("org.apache.myfaces.RENDERED_FACES_JS", Boolean.TRUE);
}
Also used : DefaultSerialFactory(org.apache.myfaces.spi.impl.DefaultSerialFactory) StringWriter(java.io.StringWriter) MockResponseWriter(org.apache.myfaces.test.mock.MockResponseWriter) HtmlOutputText(jakarta.faces.component.html.HtmlOutputText) HtmlTextRenderer(org.apache.myfaces.renderkit.html.HtmlTextRenderer)

Example 3 with HtmlTextRenderer

use of org.apache.myfaces.renderkit.html.HtmlTextRenderer in project myfaces by apache.

the class WhitespaceTestCase method setupRenderers.

@Override
protected void setupRenderers() throws Exception {
    renderKit.addRenderer(UIForm.COMPONENT_FAMILY, "jakarta.faces.Form", new HtmlFormRenderer());
    renderKit.addRenderer(UIOutput.COMPONENT_FAMILY, "jakarta.faces.Text", new HtmlTextRenderer());
    renderKit.addRenderer(UISelectOne.COMPONENT_FAMILY, "jakarta.faces.Menu", new HtmlMenuRenderer());
    renderKit.addRenderer(UIPanel.COMPONENT_FAMILY, "jakarta.faces.Grid", new HtmlGridRenderer());
}
Also used : HtmlFormRenderer(org.apache.myfaces.renderkit.html.HtmlFormRenderer) HtmlTextRenderer(org.apache.myfaces.renderkit.html.HtmlTextRenderer) HtmlMenuRenderer(org.apache.myfaces.renderkit.html.HtmlMenuRenderer) HtmlGridRenderer(org.apache.myfaces.renderkit.html.HtmlGridRenderer)

Example 4 with HtmlTextRenderer

use of org.apache.myfaces.renderkit.html.HtmlTextRenderer in project myfaces by apache.

the class XHTMLFaceletsProcessingTestCase method setupRenderers.

@Override
protected void setupRenderers() throws Exception {
    renderKit.addRenderer(UIForm.COMPONENT_FAMILY, "jakarta.faces.Form", new HtmlFormRenderer());
    renderKit.addRenderer(UIOutput.COMPONENT_FAMILY, "jakarta.faces.Text", new HtmlTextRenderer());
    renderKit.addRenderer(UISelectOne.COMPONENT_FAMILY, "jakarta.faces.Menu", new HtmlMenuRenderer());
    renderKit.addRenderer(UIPanel.COMPONENT_FAMILY, "jakarta.faces.Grid", new HtmlGridRenderer());
}
Also used : HtmlFormRenderer(org.apache.myfaces.renderkit.html.HtmlFormRenderer) HtmlTextRenderer(org.apache.myfaces.renderkit.html.HtmlTextRenderer) HtmlMenuRenderer(org.apache.myfaces.renderkit.html.HtmlMenuRenderer) HtmlGridRenderer(org.apache.myfaces.renderkit.html.HtmlGridRenderer)

Example 5 with HtmlTextRenderer

use of org.apache.myfaces.renderkit.html.HtmlTextRenderer in project myfaces by apache.

the class XMLFaceletsProcessingTestCase method setupRenderers.

@Override
protected void setupRenderers() throws Exception {
    renderKit.addRenderer(UIForm.COMPONENT_FAMILY, "jakarta.faces.Form", new HtmlFormRenderer());
    renderKit.addRenderer(UIOutput.COMPONENT_FAMILY, "jakarta.faces.Text", new HtmlTextRenderer());
    renderKit.addRenderer(UISelectOne.COMPONENT_FAMILY, "jakarta.faces.Menu", new HtmlMenuRenderer());
    renderKit.addRenderer(UIPanel.COMPONENT_FAMILY, "jakarta.faces.Grid", new HtmlGridRenderer());
}
Also used : HtmlFormRenderer(org.apache.myfaces.renderkit.html.HtmlFormRenderer) HtmlTextRenderer(org.apache.myfaces.renderkit.html.HtmlTextRenderer) HtmlMenuRenderer(org.apache.myfaces.renderkit.html.HtmlMenuRenderer) HtmlGridRenderer(org.apache.myfaces.renderkit.html.HtmlGridRenderer)

Aggregations

HtmlTextRenderer (org.apache.myfaces.renderkit.html.HtmlTextRenderer)15 HtmlFormRenderer (org.apache.myfaces.renderkit.html.HtmlFormRenderer)10 HtmlButtonRenderer (org.apache.myfaces.renderkit.html.HtmlButtonRenderer)6 HtmlGridRenderer (org.apache.myfaces.renderkit.html.HtmlGridRenderer)6 HtmlMenuRenderer (org.apache.myfaces.renderkit.html.HtmlMenuRenderer)5 HtmlTableRenderer (org.apache.myfaces.renderkit.html.HtmlTableRenderer)3 HtmlInputText (jakarta.faces.component.html.HtmlInputText)2 HtmlOutputText (jakarta.faces.component.html.HtmlOutputText)2 StringWriter (java.io.StringWriter)2 MockResponseWriter (org.apache.myfaces.test.mock.MockResponseWriter)2 HtmlCommandButton (jakarta.faces.component.html.HtmlCommandButton)1 HtmlForm (jakarta.faces.component.html.HtmlForm)1 FacesContext (jakarta.faces.context.FacesContext)1 RenderKitFactory (jakarta.faces.render.RenderKitFactory)1 ResponseStateManager (jakarta.faces.render.ResponseStateManager)1 VisitContextFactoryImpl (org.apache.myfaces.component.visit.VisitContextFactoryImpl)1 HtmlCompositeComponentRenderer (org.apache.myfaces.renderkit.html.HtmlCompositeComponentRenderer)1 HtmlCompositeFacetRenderer (org.apache.myfaces.renderkit.html.HtmlCompositeFacetRenderer)1 HtmlImageRenderer (org.apache.myfaces.renderkit.html.HtmlImageRenderer)1 HtmlLinkRenderer (org.apache.myfaces.renderkit.html.HtmlLinkRenderer)1