org.codehaus.groovy.grails.web.servlet.view
Class GrailsViewResolver
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.view.AbstractCachingViewResolver
org.springframework.web.servlet.view.UrlBasedViewResolver
org.springframework.web.servlet.view.InternalResourceViewResolver
org.codehaus.groovy.grails.web.servlet.view.GrailsViewResolver
- All Implemented Interfaces:
- ApplicationContextAware, ResourceLoaderAware, Ordered, ServletContextAware, ViewResolver
public class GrailsViewResolver
- extends InternalResourceViewResolver
- implements ResourceLoaderAware, ApplicationContextAware
A Grails view resolver which evaluates the existance of a view for different extensions choosing which
one to delegate to.
- Since:
- 0.1
Created: 11-Jan-2006
- Author:
- Graeme Rocher
Methods inherited from class org.springframework.web.servlet.view.UrlBasedViewResolver |
canHandle, createView, getAttributesMap, getCacheKey, getContentType, getOrder, getPrefix, getRequestContextAttribute, getSuffix, getViewClass, getViewNames, initApplicationContext, isRedirectContextRelative, isRedirectHttp10Compatible, setAttributes, setAttributesMap, setContentType, setOrder, setRedirectContextRelative, setRedirectHttp10Compatible, setRequestContextAttribute, setViewClass, setViewNames |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GSP_SUFFIX
public static final String GSP_SUFFIX
- See Also:
- Constant Field Values
JSP_SUFFIX
public static final String JSP_SUFFIX
- See Also:
- Constant Field Values
GrailsViewResolver
public GrailsViewResolver()
setPrefix
public void setPrefix(String prefix)
- Overrides:
setPrefix
in class UrlBasedViewResolver
setSuffix
public void setSuffix(String suffix)
- Overrides:
setSuffix
in class UrlBasedViewResolver
setResourceLoader
public void setResourceLoader(ResourceLoader resourceLoader)
- Specified by:
setResourceLoader
in interface ResourceLoaderAware
setPluginMetaManager
public void setPluginMetaManager(PluginMetaManager pluginMetaManager)
setTemplateEngine
public void setTemplateEngine(GroovyPagesTemplateEngine templateEngine)
loadView
protected View loadView(String viewName,
Locale locale)
throws Exception
- Overrides:
loadView
in class UrlBasedViewResolver
- Throws:
Exception
resolveViewForController
protected String resolveViewForController(groovy.lang.GroovyObject controller,
GrailsApplication application,
String viewName,
ResourceLoader resourceLoader)
- Attempst to resolve a view relative to a controller
- Parameters:
controller
- The controller to resolve the view relative toapplication
- The GrailsApplication instanceviewName
- The views nameresourceLoader
- The ResourceLoader to use
- Returns:
- The URI of the view
Copyright (c) 2005-2006 The Grails project