## org.codehaus.groovy.grails.scaffolding.view
Class ScaffoldingViewResolver

    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
                              org.codehaus.groovy.grails.scaffolding.view.ScaffoldingViewResolver

All Implemented Interfaces:
  ApplicationContextAware, ResourceLoaderAware, Ordered, ServletContextAware, ViewResolver

    public class ScaffoldingViewResolver

extends GrailsViewResolver
implements ApplicationContextAware

Overrides the default Grails view resolver and resolves scaffolded views at runtime

Since:
  1.1

  Created: Nov 24, 2008
Author:
  Graeme Rocher

Field Summary
`(package private) static org.apache.commons.logging.Log` `LOG`
`(package private) Map` `scaffoldedActionMap`
`(package private) Map` `scaffoldedDomains`
`(package private) static Map<org.codehaus.groovy.grails.scaffolding.view.ScaffoldingViewResolver.ViewKey,View>` `scaffoldedViews`
`(package private) GrailsTemplateGenerator` `templateGenerator`

Fields inherited from class org.codehaus.groovy.grails.web.servlet.view.GrailsViewResolver
`GSP_SUFFIX, JSP_SUFFIX`

Fields inherited from class org.springframework.web.servlet.view.UrlBasedViewResolver
`FORWARD_URL_PREFIX, REDIRECT_URL_PREFIX`

Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
`logger`

Fields inherited from interface org.springframework.core.Ordered
`HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

Constructor Summary
`ScaffoldingViewResolver()`

Method Summary
`static void` `clearViewCache()` Clears any cached scaffolded views
`protected View` `createScaffoldedView(String viewName, String viewCode)`
`protected String` `generateViewSource(GrailsWebRequest webRequest, GrailsDomainClass domainClass)`
`protected View` `loadView(String viewName, Locale locale)`
`void` `setScaffoldedActionMap(Map scaffoldedActionMap)`
`void` `setScaffoldedDomains(Map scaffoldedDomains)`
`void` `setTemplateGenerator(GrailsTemplateGenerator templateGenerator)`

Methods inherited from class org.codehaus.groovy.grails.web.servlet.view.GrailsViewResolver
`resolveViewForController, setPluginMetaManager, setPrefix, setResourceLoader, setSuffix, setTemplateEngine`

Methods inherited from class org.springframework.web.servlet.view.InternalResourceViewResolver
`buildView, requiredViewClass, setAlwaysInclude, setExposeContextBeansAsAttributes, setExposedContextBeanNames`

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 org.springframework.web.servlet.view.AbstractCachingViewResolver
`clearCache, isCache, removeFromCache, resolveViewName, setCache`

Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
`getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext`

Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
`getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.springframework.context.ApplicationContextAware
`setApplicationContext`

Field Detail

### templateGenerator

    GrailsTemplateGenerator templateGenerator

### scaffoldedActionMap

    Map scaffoldedActionMap

### scaffoldedDomains

    Map scaffoldedDomains

### scaffoldedViews

    static final Map<org.codehaus.groovy.grails.scaffolding.view.ScaffoldingViewResolver.ViewKey,View> scaffoldedViews

### LOG

    static final org.apache.commons.logging.Log LOG

Constructor Detail

### ScaffoldingViewResolver

    public ScaffoldingViewResolver()

Method Detail

### clearViewCache

    public static void clearViewCache()

  Clears any cached scaffolded views

### setTemplateGenerator

    public void setTemplateGenerator(GrailsTemplateGenerator templateGenerator)

### setScaffoldedActionMap

    public void setScaffoldedActionMap(Map scaffoldedActionMap)

### setScaffoldedDomains

    public void setScaffoldedDomains(Map scaffoldedDomains)

### loadView

    protected View loadView(String viewName,
                            Locale locale)
                     throws Exception

  Overrides:
    `loadView` in class `GrailsViewResolver`
  Throws:
    `Exception`

### createScaffoldedView

    protected View createScaffoldedView(String viewName,
                                        String viewCode)

### generateViewSource

    protected String generateViewSource(GrailsWebRequest webRequest,
                                        GrailsDomainClass domainClass)

Copyright (c) 2005-2009 The Grails project