Search in sources :

Example 6 with ViewConfigResolver

use of org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver in project deltaspike by apache.

the class ViewConfigPathTest method testNamesWizard6.

@Test
public void testNamesWizard6() {
    this.viewConfigExtension.addPageDefinition(Pages.Wizard6.Step1.class);
    ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
    ViewConfigDescriptor viewConfigDescriptor;
    viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard6.Step1.class);
    Assert.assertNotNull(viewConfigDescriptor);
    Assert.assertEquals("/pages/wizard6/step1.xhtml", viewConfigDescriptor.getViewId());
}
Also used : ViewConfigDescriptor(org.apache.deltaspike.core.api.config.view.metadata.ViewConfigDescriptor) ViewConfigResolver(org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver) Test(org.junit.Test)

Example 7 with ViewConfigResolver

use of org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver in project deltaspike by apache.

the class ViewConfigPathTest method testNamesWizard11.

@Test
public void testNamesWizard11() {
    this.viewConfigExtension.addPageDefinition(Pages.Wizard11.Step1.class);
    this.viewConfigExtension.addPageDefinition(Pages.Wizard11.Step2.class);
    this.viewConfigExtension.addPageDefinition(Pages.Wizard11.Step3.class);
    this.viewConfigExtension.addPageDefinition(Pages.Wizard11.Step4.class);
    this.viewConfigExtension.addPageDefinition(Pages.Wizard11.Step5.class);
    this.viewConfigExtension.addPageDefinition(Pages.Wizard11.Step6.class);
    this.viewConfigExtension.addPageDefinition(Pages.Wizard11.Step7.class);
    ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
    ViewConfigDescriptor viewConfigDescriptor;
    viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard11.Step1.class);
    Assert.assertNotNull(viewConfigDescriptor);
    Assert.assertEquals("/pages/w11/step1.xhtml", viewConfigDescriptor.getViewId());
    viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard11.Step2.class);
    Assert.assertNotNull(viewConfigDescriptor);
    Assert.assertEquals("/step2.xhtml", viewConfigDescriptor.getViewId());
    viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard11.Step3.class);
    Assert.assertNotNull(viewConfigDescriptor);
    Assert.assertEquals("/pages/w11/step3.xhtml", viewConfigDescriptor.getViewId());
    viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard11.Step4.class);
    Assert.assertNotNull(viewConfigDescriptor);
    Assert.assertEquals("/pages/w11/w11b/step4.xhtml", viewConfigDescriptor.getViewId());
    viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard11.Step5.class);
    Assert.assertNotNull(viewConfigDescriptor);
    Assert.assertEquals("/w11b/step5.xhtml", viewConfigDescriptor.getViewId());
    viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard11.Step6.class);
    Assert.assertNotNull(viewConfigDescriptor);
    Assert.assertEquals("/pages/w11/w11b/step6.xhtml", viewConfigDescriptor.getViewId());
    viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard11.Step7.class);
    Assert.assertNotNull(viewConfigDescriptor);
    Assert.assertEquals("/pages/w11/w11b/step7.xhtml", viewConfigDescriptor.getViewId());
}
Also used : ViewConfigDescriptor(org.apache.deltaspike.core.api.config.view.metadata.ViewConfigDescriptor) ViewConfigResolver(org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver) Test(org.junit.Test)

Example 8 with ViewConfigResolver

use of org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver in project deltaspike by apache.

the class ViewConfigPathTest method testNamesWizard5.

@Test
public void testNamesWizard5() {
    this.viewConfigExtension.addPageDefinition(Pages.Wizard5.Step1.class);
    ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
    ViewConfigDescriptor viewConfigDescriptor;
    viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard5.Step1.class);
    Assert.assertNotNull(viewConfigDescriptor);
    Assert.assertEquals("/pages/wizard5/step1.xhtml", viewConfigDescriptor.getViewId());
}
Also used : ViewConfigDescriptor(org.apache.deltaspike.core.api.config.view.metadata.ViewConfigDescriptor) ViewConfigResolver(org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver) Test(org.junit.Test)

Example 9 with ViewConfigResolver

use of org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver in project deltaspike by apache.

the class ViewConfigPathTest method testNamesWizard4.

@Test
public void testNamesWizard4() {
    this.viewConfigExtension.addPageDefinition(Pages.Wizard4.Step1.class);
    this.viewConfigExtension.addPageDefinition(Pages.Wizard4.Step2.class);
    ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
    ViewConfigDescriptor viewConfigDescriptor;
    viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard4.Step1.class);
    Assert.assertNotNull(viewConfigDescriptor);
    Assert.assertEquals("/pages/wizard4/step1.xhtml", viewConfigDescriptor.getViewId());
    viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard4.Step2.class);
    Assert.assertNotNull(viewConfigDescriptor);
    Assert.assertEquals("/step2.xhtml", viewConfigDescriptor.getViewId());
}
Also used : ViewConfigDescriptor(org.apache.deltaspike.core.api.config.view.metadata.ViewConfigDescriptor) ViewConfigResolver(org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver) Test(org.junit.Test)

Example 10 with ViewConfigResolver

use of org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver in project deltaspike by apache.

the class ViewConfigPathTest method testNamesWizard10.

@Test
public void testNamesWizard10() {
    this.viewConfigExtension.addPageDefinition(Pages.Wizard10.Step1.class);
    ViewConfigResolver viewConfigResolver = this.viewConfigResolverProducer.createViewConfigResolver();
    ViewConfigDescriptor viewConfigDescriptor;
    viewConfigDescriptor = viewConfigResolver.getViewConfigDescriptor(Pages.Wizard10.Step1.class);
    Assert.assertNotNull(viewConfigDescriptor);
    Assert.assertEquals("/pages/w10a/step1.xhtml", viewConfigDescriptor.getViewId());
}
Also used : ViewConfigDescriptor(org.apache.deltaspike.core.api.config.view.metadata.ViewConfigDescriptor) ViewConfigResolver(org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver) Test(org.junit.Test)

Aggregations

ViewConfigResolver (org.apache.deltaspike.core.api.config.view.metadata.ViewConfigResolver)44 Test (org.junit.Test)37 ViewConfigDescriptor (org.apache.deltaspike.core.api.config.view.metadata.ViewConfigDescriptor)36 ArrayList (java.util.ArrayList)5 Method (java.lang.reflect.Method)3 ViewControllerRef (org.apache.deltaspike.core.api.config.view.controller.ViewControllerRef)3 View (org.apache.deltaspike.jsf.api.config.view.View)3 DefaultErrorView (org.apache.deltaspike.core.api.config.view.DefaultErrorView)2 ViewConfig (org.apache.deltaspike.core.api.config.view.ViewConfig)2 PreRenderView (org.apache.deltaspike.core.api.config.view.controller.PreRenderView)2 JsfModuleConfig (org.apache.deltaspike.jsf.api.config.JsfModuleConfig)2 ErrorViewAwareAccessDeniedException (org.apache.deltaspike.security.api.authorization.ErrorViewAwareAccessDeniedException)2 MalformedURLException (java.net.MalformedURLException)1 HashSet (java.util.HashSet)1 Set (java.util.Set)1 ApplicationScoped (javax.enterprise.context.ApplicationScoped)1 Produces (javax.enterprise.inject.Produces)1 ConfigurableNavigationHandler (javax.faces.application.ConfigurableNavigationHandler)1 NavigationCase (javax.faces.application.NavigationCase)1 ProjectStage (javax.faces.application.ProjectStage)1