Search in sources :

Example 1 with HtmlButtonRenderer

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

the class PartialStateManagementStrategyTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    FactoryFinder.setFactory(FactoryFinder.VISIT_CONTEXT_FACTORY, VisitContextFactoryImpl.class.getName());
    RenderKitFactory renderKitFactory = (RenderKitFactory) FactoryFinder.getFactory("jakarta.faces.render.RenderKitFactory");
    renderKit = new MockRenderKit() {

        ResponseStateManager stateManager = new ResponseStateManager() {

            public Object getState(FacesContext context, String viewId) {
                return stateToRestore;
            }
        };

        @Override
        public ResponseStateManager getResponseStateManager() {
            return stateManager;
        }
    };
    renderKitFactory.addRenderKit("HTML_BASIC2", renderKit);
    // FactoryFinder.setFactory(FactoryFinder.VISIT_CONTEXT_FACTORY,
    // VisitContextFactoryImpl.class.getName());
    renderKit.addRenderer(new HtmlCommandButton().getFamily(), new HtmlCommandButton().getRendererType(), new HtmlButtonRenderer());
    renderKit.addRenderer(new HtmlForm().getFamily(), new HtmlForm().getRendererType(), new HtmlFormRenderer());
    renderKit.addRenderer(new HtmlOutputText().getFamily(), new HtmlOutputText().getRendererType(), new HtmlTextRenderer());
    renderKit.addRenderer(new HtmlInputText().getFamily(), new HtmlInputText().getRendererType(), new HtmlTextRenderer());
}
Also used : FacesContext(jakarta.faces.context.FacesContext) HtmlInputText(jakarta.faces.component.html.HtmlInputText) VisitContextFactoryImpl(org.apache.myfaces.component.visit.VisitContextFactoryImpl) HtmlCommandButton(jakarta.faces.component.html.HtmlCommandButton) HtmlFormRenderer(org.apache.myfaces.renderkit.html.HtmlFormRenderer) HtmlTextRenderer(org.apache.myfaces.renderkit.html.HtmlTextRenderer) HtmlForm(jakarta.faces.component.html.HtmlForm) ResponseStateManager(jakarta.faces.render.ResponseStateManager) HtmlButtonRenderer(org.apache.myfaces.renderkit.html.HtmlButtonRenderer) HtmlOutputText(jakarta.faces.component.html.HtmlOutputText) MockRenderKit(org.apache.myfaces.test.mock.MockRenderKit) RenderKitFactory(jakarta.faces.render.RenderKitFactory)

Example 2 with HtmlButtonRenderer

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

the class JstlCoreTestCase method setupRenderers.

@Override
protected void setupRenderers() throws Exception {
    renderKit.addRenderer(UIForm.COMPONENT_FAMILY, "jakarta.faces.Form", new HtmlFormRenderer());
    renderKit.addRenderer(HtmlCommandButton.COMPONENT_FAMILY, "jakarta.faces.Button", new HtmlButtonRenderer());
    renderKit.addRenderer(HtmlInputText.COMPONENT_FAMILY, "jakarta.faces.Text", new HtmlTextRenderer());
    renderKit.addRenderer(HtmlOutputText.COMPONENT_FAMILY, "jakarta.faces.Text", new HtmlTextRenderer());
}
Also used : HtmlButtonRenderer(org.apache.myfaces.renderkit.html.HtmlButtonRenderer) HtmlFormRenderer(org.apache.myfaces.renderkit.html.HtmlFormRenderer) HtmlTextRenderer(org.apache.myfaces.renderkit.html.HtmlTextRenderer)

Example 3 with HtmlButtonRenderer

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

the class HtmlTestCase method setupRenderers.

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

Example 4 with HtmlButtonRenderer

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

the class CoreTestCase method setupRenderers.

@Override
protected void setupRenderers() throws Exception {
    renderKit.addRenderer(UIOutput.COMPONENT_FAMILY, "jakarta.faces.Text", new HtmlTextRenderer());
    renderKit.addRenderer(UIInput.COMPONENT_FAMILY, "jakarta.faces.Text", new HtmlTextRenderer());
    renderKit.addRenderer(UIGraphic.COMPONENT_FAMILY, "jakarta.faces.Image", new HtmlImageRenderer());
    renderKit.addRenderer(UICommand.COMPONENT_FAMILY, "jakarta.faces.Link", new HtmlLinkRenderer());
    renderKit.addRenderer(UIForm.COMPONENT_FAMILY, "jakarta.faces.Form", new HtmlFormRenderer());
    renderKit.addRenderer(UIData.COMPONENT_FAMILY, "jakarta.faces.Table", new HtmlTableRenderer());
    renderKit.addRenderer(UICommand.COMPONENT_FAMILY, "jakarta.faces.Button", new HtmlButtonRenderer());
}
Also used : HtmlButtonRenderer(org.apache.myfaces.renderkit.html.HtmlButtonRenderer) HtmlFormRenderer(org.apache.myfaces.renderkit.html.HtmlFormRenderer) HtmlTableRenderer(org.apache.myfaces.renderkit.html.HtmlTableRenderer) HtmlTextRenderer(org.apache.myfaces.renderkit.html.HtmlTextRenderer) HtmlImageRenderer(org.apache.myfaces.renderkit.html.HtmlImageRenderer) HtmlLinkRenderer(org.apache.myfaces.renderkit.html.HtmlLinkRenderer)

Example 5 with HtmlButtonRenderer

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

the class RemoveTestCase method setupRenderers.

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

Aggregations

HtmlButtonRenderer (org.apache.myfaces.renderkit.html.HtmlButtonRenderer)6 HtmlFormRenderer (org.apache.myfaces.renderkit.html.HtmlFormRenderer)6 HtmlTextRenderer (org.apache.myfaces.renderkit.html.HtmlTextRenderer)6 HtmlGridRenderer (org.apache.myfaces.renderkit.html.HtmlGridRenderer)2 HtmlCommandButton (jakarta.faces.component.html.HtmlCommandButton)1 HtmlForm (jakarta.faces.component.html.HtmlForm)1 HtmlInputText (jakarta.faces.component.html.HtmlInputText)1 HtmlOutputText (jakarta.faces.component.html.HtmlOutputText)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 HtmlImageRenderer (org.apache.myfaces.renderkit.html.HtmlImageRenderer)1 HtmlLinkRenderer (org.apache.myfaces.renderkit.html.HtmlLinkRenderer)1 HtmlMenuRenderer (org.apache.myfaces.renderkit.html.HtmlMenuRenderer)1 HtmlMessagesRenderer (org.apache.myfaces.renderkit.html.HtmlMessagesRenderer)1 HtmlTableRenderer (org.apache.myfaces.renderkit.html.HtmlTableRenderer)1 MockRenderKit (org.apache.myfaces.test.mock.MockRenderKit)1