Spring Framework TilesViewResolver - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework TilesViewResolver class.

This code example shows how to use the following methods:afterPropertiesSet, setDefinitions, setServletContext, setUseMutableTilesContainer, setValidateDefinitions
 
		servletContext = new MockServletContext("/org/springframework/js/ajax/tiles2/"); 
		request = new MockHttpServletRequest(servletContext); 
		response = new MockHttpServletResponse(); 
 
		TilesConfigurer tc = new TilesConfigurer(); 
		tc.setDefinitions(new String[] { "tiles-definitions.xml" }); 
		tc.setValidateDefinitions(true); 
		tc.setServletContext(servletContext); 
		tc.setUseMutableTilesContainer(true); 
		tc.afterPropertiesSet(); 
 
		ajaxTilesView = new AjaxTilesView(); 
	} 
 
	private void setupStaticWebApplicationContext() { 
		StaticWebApplicationContext wac = new StaticWebApplicationContext(); 
		wac.setServletContext(servletContext); 
		wac.refresh(); 
		request.setAttribute(RequestContext.WEB_APPLICATION_CONTEXT_ATTRIBUTE, wac); 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setCheckRefresh, setDefinitions
		return viewResolver;
	} 
 
	@Bean 
	public TilesConfigurer tilesConfigurer() {
		TilesConfigurer configurer = new TilesConfigurer();
		configurer.setDefinitions(new String[] {
				"/WEB-INF/layouts/tiles.xml", 
				"/WEB-INF/views/**/tiles.xml"                            
		}); 
		configurer.setCheckRefresh(true);
		return configurer;
	} 
 
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
	} 
	 
    @Bean 
    public MessageSource messageSource() {
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setOrder
This code example shows how to use the following methods:setCheckRefresh, setDefinitions
		return viewResolver;
	} 
 
	@Bean 
	public TilesConfigurer tilesConfigurer() {
		TilesConfigurer configurer = new TilesConfigurer();
		configurer.setDefinitions(new String[] {
				"/WEB-INF/layouts/tiles.xml", 
				"/WEB-INF/views/**/tiles.xml"                            
		}); 
		configurer.setCheckRefresh(true);
		return configurer;
	} 
 
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
	} 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setCheckRefresh, setDefinitions
		return viewResolver;
	} 
 
	@Bean 
	public TilesConfigurer tilesConfigurer() {
		TilesConfigurer configurer = new TilesConfigurer();
		configurer.setDefinitions(new String[] {
				"/WEB-INF/layouts/tiles.xml", 
				"/WEB-INF/views/**/tiles.xml"                            
		}); 
		configurer.setCheckRefresh(true);
		return configurer;
	} 
 
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
	} 
	 
    @Bean 
    public MessageSource messageSource() {
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setDefinitions
		return new StringToEntityConverter(Category.class);
	} 
 
	@Bean 
	public TilesConfigurer tilesConfigurer() {
		TilesConfigurer tilesConfigurer = new TilesConfigurer();
		tilesConfigurer.setDefinitions(new String[] { "/WEB-INF/tiles/tiles-configuration.xml" });
		return tilesConfigurer;
	} 
 
	@Bean 
	public CommonDataHandlerInterceptor commonDataHandlerInterceptor() { 
		return new CommonDataHandlerInterceptor(); 
	} 
 
	@Override 
	public void addFormatters(FormatterRegistry registry) {
		registry.addConverter(bookConverter());
		registry.addConverter(categoryConverter());
	} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setDefinitions
		return resolver;
	} 
	 
	@Bean 
	public TilesConfigurer tilesConfigurer() {
		TilesConfigurer configurer = new TilesConfigurer();
		configurer.setDefinitions(new String[] {"/WEB-INF/**/tiles.xml"});
		return configurer;
	} 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setContentType
		return resolver; 
	} 
 
	// Other view resolvers defined directly to CNVR, no longer @Beans 
	private ViewResolver getTilesViewResolver() { 
		TilesViewResolver resolver = new TilesViewResolver(); 
		resolver.setContentType("text/html"); 
		return resolver; 
	} 
 
	private ViewResolver getXmlViewResolver() { 
		XmlViewResolver resolver = new XmlViewResolver(); 
		resolver.setLocation(new ServletContextResource(servletContext, 
				"/WEB-INF/spring/spreadsheet-views.xml")); 
		return resolver; 
	} 
 
	private ViewResolver getJsonViewResolver() { 
		return new JsonViewResolver(); 
	} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setContentType
		registry.addViewController("/denied").setViewName("denied");
	} 
 
	@Bean(name="tilesViewResolver") 
	public ViewResolver getTilesViewResolver() {
		TilesViewResolver resolver = new TilesViewResolver();
		resolver.setContentType("text/html");
		return resolver;
	} 
 
	@Bean 
	public TilesConfigurer getTilesConfigurer() {
		TilesConfigurer configurer = new TilesConfigurer();
		String[] tilesDefFiles = { "/WEB-INF/tiles.xml",
				"/WEB-INF/accounts/tiles.xml" }; 
		configurer.setDefinitions(tilesDefFiles);
		return configurer;
	} 
 
	@Override 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setContentType
	 
	// View Resolvers - all separate top-level bens 
	 
	@Bean(name = "tilesViewResolver") 
	public ViewResolver getTilesViewResolver() { 
		TilesViewResolver resolver = new TilesViewResolver(); 
		resolver.setContentType("text/html"); 
		return resolver; 
	} 
 
	@Bean(name = "excelViewResolver") 
	public ViewResolver getXmlViewResolver() { 
		XmlViewResolver resolver = new XmlViewResolver(); 
		resolver.setLocation(new ServletContextResource(servletContext, 
				"/WEB-INF/spring/spreadsheet-views.xml")); 
		return resolver; 
	} 
 
	@Bean(name = "jsonViewResolver") 
	public ViewResolver getJsonViewResolver() { 
4
CodeRank
Experience pair programming with AI  Get Codota for Java