Search in sources :

Example 1 with NavigationHandlerImpl

use of org.apache.myfaces.application.NavigationHandlerImpl in project myfaces by apache.

the class HtmlOutcomeTargetButtonClientBehaviorRendererTest method setUpApplication.

@Override
protected void setUpApplication() throws Exception {
    super.setUpApplication();
    application.setNavigationHandler(new NavigationHandlerImpl());
}
Also used : NavigationHandlerImpl(org.apache.myfaces.application.NavigationHandlerImpl)

Example 2 with NavigationHandlerImpl

use of org.apache.myfaces.application.NavigationHandlerImpl in project myfaces by apache.

the class HtmlOutcomeTargetLinkClientBehaviorRendererTest method setUpApplication.

@Override
protected void setUpApplication() throws Exception {
    super.setUpApplication();
    application.setNavigationHandler(new NavigationHandlerImpl());
}
Also used : NavigationHandlerImpl(org.apache.myfaces.application.NavigationHandlerImpl)

Example 3 with NavigationHandlerImpl

use of org.apache.myfaces.application.NavigationHandlerImpl in project myfaces by apache.

the class HtmlLinkRendererTest method setUp.

public void setUp() throws Exception {
    super.setUp();
    UIForm form = new UIForm();
    commandLink = new HtmlCommandLink();
    outputLink = new HtmlOutputLink();
    outputLink.setValue("http://someurl");
    outcomeTargetLink = new HtmlOutcomeTargetLink();
    form.getChildren().add(commandLink);
    writer = new MockResponseWriter(new StringWriter(), null, "UTF-8");
    facesContext.setResponseWriter(writer);
    facesContext.getApplication().setNavigationHandler(new NavigationHandlerImpl());
    facesContext.getViewRoot().setRenderKitId(MockRenderKitFactory.HTML_BASIC_RENDER_KIT);
    facesContext.getRenderKit().addRenderer(commandLink.getFamily(), commandLink.getRendererType(), new HtmlLinkRenderer());
    facesContext.getRenderKit().addRenderer(form.getFamily(), form.getRendererType(), new HtmlFormRenderer());
    facesContext.getRenderKit().addRenderer(outputLink.getFamily(), outputLink.getRendererType(), new HtmlLinkRenderer());
    facesContext.getRenderKit().addRenderer(outcomeTargetLink.getFamily(), outcomeTargetLink.getRendererType(), new HtmlLinkRenderer());
    facesContext.getAttributes().put("org.apache.myfaces.RENDERED_FACES_JS", Boolean.TRUE);
}
Also used : StringWriter(java.io.StringWriter) HtmlCommandLink(jakarta.faces.component.html.HtmlCommandLink) HtmlOutcomeTargetLink(jakarta.faces.component.html.HtmlOutcomeTargetLink) HtmlOutputLink(jakarta.faces.component.html.HtmlOutputLink) MockResponseWriter(org.apache.myfaces.test.mock.MockResponseWriter) UIForm(jakarta.faces.component.UIForm) NavigationHandlerImpl(org.apache.myfaces.application.NavigationHandlerImpl)

Example 4 with NavigationHandlerImpl

use of org.apache.myfaces.application.NavigationHandlerImpl in project myfaces by apache.

the class HtmlOutcomeTargetButtonRendererTest method setUp.

public void setUp() throws Exception {
    super.setUp();
    writer = new MockResponseWriter(new StringWriter(), null, null);
    facesContext.setResponseWriter(writer);
    facesContext.getApplication().setNavigationHandler(new NavigationHandlerImpl());
    outcomeTargetButton = new HtmlOutcomeTargetButton();
    form = new HtmlForm();
    outcomeTargetButton.setParent(form);
    facesContext.getViewRoot().setRenderKitId(MockRenderKitFactory.HTML_BASIC_RENDER_KIT);
    facesContext.getRenderKit().addRenderer(outcomeTargetButton.getFamily(), outcomeTargetButton.getRendererType(), new HtmlOutcomeTargetButtonRenderer());
    facesContext.getRenderKit().addRenderer(form.getFamily(), form.getRendererType(), new HtmlFormRenderer());
    facesContext.getAttributes().put("org.apache.myfaces.RENDERED_FACES_JS", Boolean.TRUE);
}
Also used : StringWriter(java.io.StringWriter) HtmlForm(jakarta.faces.component.html.HtmlForm) MockResponseWriter(org.apache.myfaces.test.mock.MockResponseWriter) HtmlOutcomeTargetButton(jakarta.faces.component.html.HtmlOutcomeTargetButton) NavigationHandlerImpl(org.apache.myfaces.application.NavigationHandlerImpl)

Example 5 with NavigationHandlerImpl

use of org.apache.myfaces.application.NavigationHandlerImpl in project myfaces by apache.

the class HtmlCommandButtonClientBehaviorRendererTest method setUpApplication.

@Override
protected void setUpApplication() throws Exception {
    super.setUpApplication();
    application.setNavigationHandler(new NavigationHandlerImpl());
}
Also used : NavigationHandlerImpl(org.apache.myfaces.application.NavigationHandlerImpl)

Aggregations

NavigationHandlerImpl (org.apache.myfaces.application.NavigationHandlerImpl)6 StringWriter (java.io.StringWriter)2 MockResponseWriter (org.apache.myfaces.test.mock.MockResponseWriter)2 UIForm (jakarta.faces.component.UIForm)1 HtmlCommandLink (jakarta.faces.component.html.HtmlCommandLink)1 HtmlForm (jakarta.faces.component.html.HtmlForm)1 HtmlOutcomeTargetButton (jakarta.faces.component.html.HtmlOutcomeTargetButton)1 HtmlOutcomeTargetLink (jakarta.faces.component.html.HtmlOutcomeTargetLink)1 HtmlOutputLink (jakarta.faces.component.html.HtmlOutputLink)1