Examples of BookmarkableRedirectViewIdResolver


Examples of org.springframework.springfaces.mvc.servlet.view.BookmarkableRedirectViewIdResolver

public class MvcViewResolverBeanDefinitionParserTest extends AbstractNamespaceTest {

  @Test
  public void shouldAddWithDefaults() throws Exception {
    StaticWebApplicationContext applicationContext = loadApplicationContext("<faces:mvc-view-resolver/>");
    BookmarkableRedirectViewIdResolver resolver = applicationContext
        .getBean(BookmarkableRedirectViewIdResolver.class);
    View view = resolver.resolveViewName("view", Locale.US);
    assertThat(view, is(FacesView.class));
    assertThat(((FacesView) view).getViewId(), is("/WEB-INF/pages/view.xhtml"));
  }
View Full Code Here

Examples of org.springframework.springfaces.mvc.servlet.view.BookmarkableRedirectViewIdResolver

  }

  @Test
  public void shouldAddWithSpecificProperties() throws Exception {
    StaticWebApplicationContext applicationContext = loadApplicationContext("<faces:mvc-view-resolver prefix=\"p\" suffix=\"s\" order=\"123\"/>");
    BookmarkableRedirectViewIdResolver resolver = applicationContext
        .getBean(BookmarkableRedirectViewIdResolver.class);
    View view = resolver.resolveViewName("view", Locale.US);
    assertThat(view, is(FacesView.class));
    assertThat(((FacesView) view).getViewId(), is("pviews"));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.