Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.web.servlet.view
[Java] Class GrailsViewResolver

    java.lang.Object
      org.springframework.web.servlet.view.InternalResourceViewResolver
          org.codehaus.groovy.grails.web.servlet.view.GrailsViewResolver

All Implemented Interfaces:
  ResourceLoaderAware

    public class GrailsViewResolver
    extends InternalResourceViewResolver

Evaluates the existance of a view for different extensions choosing which one to delegate to.

Authors:
  Graeme Rocher

Since:
  0.1

Field Summary
`static java.lang.String` | `GSP_SUFFIX`
`static java.lang.String` | `JSP_SUFFIX`
`protected GroovyPagesTemplateEngine` | `templateEngine`

Constructor Summary
`GrailsViewResolver()` Constructor.

Method Summary
`protected View` | `loadView(java.lang.String viewName, java.util.Locale locale)`
`protected java.lang.String` | `resolveViewForController(groovy.lang.GroovyObject controller, GrailsApplication application, java.lang.String viewName, ResourceLoader loader)` Attempts to resolve a view relative to a controller.
`void` | `setPluginManager(GrailsPluginManager pluginManager)`
`void` | `setPrefix(java.lang.String prefix)`
`void` | `setResourceLoader(ResourceLoader resourceLoader)`
`void` | `setTemplateEngine(GroovyPagesTemplateEngine templateEngine)`

Field Detail

### GSP_SUFFIX

    public static final java.lang.String GSP_SUFFIX

### JSP_SUFFIX

    public static final java.lang.String JSP_SUFFIX

### templateEngine

    protected GroovyPagesTemplateEngine templateEngine

Constructor Detail

### GrailsViewResolver

    public GrailsViewResolver()

  Constructor.

Method Detail

### loadView

    @Override
    protected View loadView(java.lang.String viewName, java.util.Locale locale)

### resolveViewForController

    protected java.lang.String resolveViewForController(groovy.lang.GroovyObject controller, GrailsApplication application, java.lang.String viewName, ResourceLoader loader)

  Attempts to resolve a view relative to a controller.
  Parameters:
    `controller` - The controller to resolve the view relative to
    `application` - The GrailsApplication instance
    `viewName` - The views name
    `loader` - The ResourceLoader to use
  Returns:
    The URI of the view

### setPluginManager

    public void setPluginManager(GrailsPluginManager pluginManager)

### setPrefix

    @Override
    public void setPrefix(java.lang.String prefix)

### setResourceLoader

    public void setResourceLoader(ResourceLoader resourceLoader)

### setTemplateEngine

    public void setTemplateEngine(GroovyPagesTemplateEngine templateEngine)

Groovy Documentation