Spring Framework TilesConfigurer - 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 TilesConfigurer 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
Contextual code suggestions in your IDE  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
Contextual code suggestions in your IDE  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/");
	} 
} 
5
CodeRank
Contextual code suggestions in your IDE  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/");
	} 
	 
    @Bean 
    public MessageSource messageSource() {
5
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setDefinitions
		registry.addViewController("/denied").setViewName("denied"); 
	} 
 
	@Bean(name = "tilesConfigurer") 
	public TilesConfigurer getTilesConfigurer() { 
		TilesConfigurer configurer = new TilesConfigurer(); 
		String[] tilesDefFiles = { "/WEB-INF/tiles.xml", 
				"/WEB-INF/accounts/tiles.xml" }; 
		configurer.setDefinitions(tilesDefFiles); 
		return configurer; 
	} 
 
	@Bean(name = "messageSource") 
	// Mandatory name 
	public MessageSource getMessageSource() { 
		ReloadableResourceBundleMessageSource msgSrc = new ReloadableResourceBundleMessageSource(); 
		msgSrc.setBasename("/WEB-INF/messages/global"); 
		return msgSrc; 
	} 
 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setDefinitions
		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 
	public void configureContentNegotiation( 
			ContentNegotiationConfigurer configurer) {
		// Simple strategy: only path extension is taken into account 
		configurer.favorPathExtension(true).ignoreAcceptHeader(true)
				.useJaf(false).defaultContentType(MediaType.TEXT_HTML)
				.mediaType("html", MediaType.TEXT_HTML)
				.mediaType("xml", MediaType.APPLICATION_XML)
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:setDefinitions
	} 
 
 
	@Bean(name = "tilesConfigurer") 
	public TilesConfigurer getTilesConfigurer() { 
		TilesConfigurer configurer = new TilesConfigurer(); 
		String[] tilesDefFiles = { "/WEB-INF/tiles.xml", 
				"/WEB-INF/accounts/tiles.xml" }; 
		configurer.setDefinitions(tilesDefFiles); 
		return configurer; 
	} 
 
	@Bean(name = "messageSource") 
	// Mandatory name 
	public MessageSource getMessageSource() { 
		ReloadableResourceBundleMessageSource msgSrc = new ReloadableResourceBundleMessageSource(); 
		msgSrc.setBasename("/WEB-INF/messages/global"); 
		return msgSrc; 
	} 
	 
4
CodeRank
Contextual code suggestions in your IDE  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
Contextual code suggestions in your IDE  Get Codota for Java
This code example shows how to use the following methods:
 * </p> 
 * 
 * @author Jeremy Grelle 
 * @author David Winterfeldt 
 */ 
public class AjaxTilesView extends TilesView { 
 
	private static final String FRAGMENTS_PARAM = "fragments"; 
 
	private TilesRequestContextFactory tilesRequestContextFactory; 
 
	private AjaxHandler ajaxHandler = new SpringJavascriptAjaxHandler(); 
 
	public void afterPropertiesSet() throws Exception { 
		super.afterPropertiesSet(); 
		tilesRequestContextFactory = new ServletTilesRequestContextFactory(); 
		tilesRequestContextFactory.init(new HashMap<String, String>()); 
	} 
 
	public AjaxHandler getAjaxHandler() { 
4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Spring Framework TilesConfigurer Methods: