public class GrailsConventionGroovyPageLocator extends DefaultGroovyPageLocator implements org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware
DefaultGroovyPageLocator.PluginViewPathInfopluginManager, reloadEnabled, resourceLoaders, warDeployed| Constructor and Description |
|---|
GrailsConventionGroovyPageLocator() |
| Modifier and Type | Method and Description |
|---|---|
GroovyPageScriptSource |
findTemplate(java.lang.Object controller,
java.lang.String templateName)
Finds a template for the given controller name and template name
|
GroovyPageScriptSource |
findTemplate(java.lang.String templateName)
Finds a template for the given given template name, looking up the controller from the request as necessary
|
GroovyPageScriptSource |
findTemplate(java.lang.String controllerName,
java.lang.String templateName)
Finds a template for the given controller name and template name
|
GroovyPageScriptSource |
findTemplateByPath(java.lang.String uri)
Find a template for a path.
|
GroovyPageScriptSource |
findTemplateInBinding(java.lang.String templateName,
GroovyPageBinding binding)
Finds a template for the given given template name, looking up the controller from the request as necessary
|
GroovyPageScriptSource |
findTemplateInBinding(java.lang.String pluginName,
java.lang.String templateName,
GroovyPageBinding binding)
Finds a template for the given given template name, looking up the controller from the request as necessary
|
GroovyPageScriptSource |
findView(java.lang.Object controller,
java.lang.String viewName)
Finds a view for the given controller and view name.
|
GroovyPageScriptSource |
findView(java.lang.String viewName)
Finds a view for the given given view name, looking up the controller from the request as necessary
|
GroovyPageScriptSource |
findView(java.lang.String controllerName,
java.lang.String viewName)
Finds a view for the given controller name and view name.
|
GroovyPageScriptSource |
findView(java.lang.String controllerName,
java.lang.String viewName,
java.lang.String format) |
GroovyPageScriptSource |
findViewByPath(java.lang.String uri)
Find a view for a path.
|
GroovyPageScriptSource |
findViewForFormat(java.lang.String controllerName,
java.lang.String viewName,
java.lang.String format)
Finds a view for the given view name and format, otherwise returns null if it doesn't exist
|
protected java.lang.String |
getNameForController(java.lang.Object controller) |
protected java.lang.String |
lookupRequestFormat() |
java.lang.String |
resolveViewFormat(java.lang.String viewName) |
void |
setGrailsApplication(org.codehaus.groovy.grails.commons.GrailsApplication grailsApplication) |
void |
setMimeTypeResolver(org.codehaus.groovy.grails.web.mime.MimeTypeResolver mimeTypeResolver) |
addResourceLoader, createGroovyPageCompiledScriptSource, findBinaryScriptSource, findPage, findPageInBinding, findPageInBinding, findReloadablePage, findResource, findResource, findResourceInPlugins, findResourceScriptPathForSearchPaths, findResourceScriptSource, findResourceScriptSourceInPlugins, getPluginViewPathInfo, isReloadEnabled, removePrecompiledPage, removePrefix, removeViewLocationPrefixes, resolveContextPath, resolvePluginViewPath, resolveSearchPaths, resolveViewInBinaryPlugin, setApplicationContext, setPluginManager, setPrecompiledGspMap, setReloadEnabled, setResourceLoader, setServletContext@Autowired(required=false) public void setMimeTypeResolver(org.codehaus.groovy.grails.web.mime.MimeTypeResolver mimeTypeResolver)
public GroovyPageScriptSource findViewByPath(java.lang.String uri)
uri - The uri to searchpublic GroovyPageScriptSource findView(java.lang.String controllerName, java.lang.String viewName)
Finds a view for the given controller name and view name. For example specifying a controller name of "home" and a view name of "index" will search for /WEB-INF/grails-app/views/home/index.gsp in production and grails-app/views/home/index.gsp in development
This method will also detect the presence of the requested response format and try to resolve a more appropriate view. For example in the response format is 'xml' then /WEB-INF/grails-app/views/home/index.xml.gsp will be tried first
If the view is not found in the application then a scan is executed that searches through binary and source plugins looking for the first matching view name
controllerName - The controller nameviewName - The view namepublic GroovyPageScriptSource findView(java.lang.String controllerName, java.lang.String viewName, java.lang.String format)
public GroovyPageScriptSource findViewForFormat(java.lang.String controllerName, java.lang.String viewName, java.lang.String format)
controllerName - The controller nameviewName - The view nameformat - The formatpublic java.lang.String resolveViewFormat(java.lang.String viewName)
public GroovyPageScriptSource findView(java.lang.Object controller, java.lang.String viewName)
Finds a view for the given controller and view name. For example specifying a controller with a class name of HomeController and a view name of "index" will search for /WEB-INF/grails-app/views/home/index.gsp in production and grails-app/views/home/index.gsp in development
If the view is not found in the application then a scan is executed that searches through binary and source plugins looking for the first matching view name
controller - The controllerviewName - The view namepublic GroovyPageScriptSource findTemplate(java.lang.String controllerName, java.lang.String templateName)
controllerName - The controller nametemplateName - The view namepublic GroovyPageScriptSource findTemplate(java.lang.Object controller, java.lang.String templateName)
controller - The controller ntemplateName - The view namepublic GroovyPageScriptSource findView(java.lang.String viewName)
viewName - The view namepublic GroovyPageScriptSource findTemplate(java.lang.String templateName)
templateName - The template namepublic GroovyPageScriptSource findTemplateInBinding(java.lang.String templateName, GroovyPageBinding binding)
templateName - The template namepublic GroovyPageScriptSource findTemplateInBinding(java.lang.String pluginName, java.lang.String templateName, GroovyPageBinding binding)
pluginName - The plugintemplateName - The template namebinding - The bindingpublic GroovyPageScriptSource findTemplateByPath(java.lang.String uri)
uri - The uri to searchprotected java.lang.String lookupRequestFormat()
protected java.lang.String getNameForController(java.lang.Object controller)
public void setGrailsApplication(org.codehaus.groovy.grails.commons.GrailsApplication grailsApplication)
setGrailsApplication in interface org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware