public class GrailsConventionGroovyPageLocator extends org.grails.gsp.io.DefaultGroovyPageLocator
Extended GroovyPageLocator that deals with the details of Grails' conventions for controllers names, view names and template names
Fields inherited from class | Fields |
---|---|
class org.grails.gsp.io.DefaultGroovyPageLocator |
PATH_TO_WEB_INF_VIEWS |
Type Params | Return Type | Name and description |
---|---|---|
|
org.grails.gsp.io.GroovyPageScriptSource |
findTemplate(java.lang.String controllerName, java.lang.String templateName) Finds a template for the given controller name and template name |
|
org.grails.gsp.io.GroovyPageScriptSource |
findTemplate(java.lang.Object controller, java.lang.String templateName) Finds a template for the given controller name and template name |
|
org.grails.gsp.io.GroovyPageScriptSource |
findTemplate(java.lang.String templateName) Finds a template for the given given template name, looking up the controller from the request as necessary |
|
org.grails.gsp.io.GroovyPageScriptSource |
findTemplateByPath(java.lang.String uri) Find a template for a path. |
|
org.grails.gsp.io.GroovyPageScriptSource |
findTemplateInBinding(java.lang.Object controller, java.lang.String templateName, org.grails.taglib.TemplateVariableBinding binding) Finds a template for the given given template name, looking up the controller from the request as necessary |
|
org.grails.gsp.io.GroovyPageScriptSource |
findTemplateInBinding(java.lang.Object controller, java.lang.String pluginName, java.lang.String templateName, org.grails.taglib.TemplateVariableBinding binding) Finds a template for the given given template name, looking up the controller from the request as necessary |
|
org.grails.gsp.io.GroovyPageScriptSource |
findTemplateInBinding(java.lang.String templateName, org.grails.taglib.TemplateVariableBinding binding) Finds a template for the given given template name, looking up the controller from the request as necessary |
|
org.grails.gsp.io.GroovyPageScriptSource |
findTemplateInBinding(java.lang.String pluginName, java.lang.String templateName, org.grails.taglib.TemplateVariableBinding binding) Finds a template for the given given template name, looking up the controller from the request as necessary |
|
org.grails.gsp.io.GroovyPageScriptSource |
findView(java.lang.String controllerName, java.lang.String viewName) |
|
org.grails.gsp.io.GroovyPageScriptSource |
findView(java.lang.String controllerName, java.lang.String viewName, java.lang.String format) |
|
org.grails.gsp.io.GroovyPageScriptSource |
findView(java.lang.Object controller, java.lang.String viewName) |
|
org.grails.gsp.io.GroovyPageScriptSource |
findView(java.lang.String viewName) Finds a view for the given given view name, looking up the controller from the request as necessary |
|
org.grails.gsp.io.GroovyPageScriptSource |
findViewByPath(java.lang.String uri) Find a view for a path. |
|
org.grails.gsp.io.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(grails.core.GrailsApplication grailsApplication) |
|
void |
setMimeTypeResolver(grails.web.mime.MimeTypeResolver mimeTypeResolver) |
Methods inherited from class | Name |
---|---|
class org.grails.gsp.io.DefaultGroovyPageLocator |
org.grails.gsp.io.DefaultGroovyPageLocator#setApplicationContext(org.springframework.context.ApplicationContext), org.grails.gsp.io.DefaultGroovyPageLocator#setResourceLoader(org.springframework.core.io.ResourceLoader), org.grails.gsp.io.DefaultGroovyPageLocator#addResourceLoader(org.springframework.core.io.ResourceLoader), org.grails.gsp.io.DefaultGroovyPageLocator#setPrecompiledGspMap(java.util.Map), org.grails.gsp.io.DefaultGroovyPageLocator#findPage(java.lang.String), org.grails.gsp.io.DefaultGroovyPageLocator#findPageInBinding(java.lang.String, java.lang.String, org.grails.taglib.TemplateVariableBinding), org.grails.gsp.io.DefaultGroovyPageLocator#findPageInBinding(java.lang.String, org.grails.taglib.TemplateVariableBinding), org.grails.gsp.io.DefaultGroovyPageLocator#removePrecompiledPage(org.grails.gsp.io.GroovyPageCompiledScriptSource), org.grails.gsp.io.DefaultGroovyPageLocator#setPluginManager(grails.plugins.GrailsPluginManager), org.grails.gsp.io.DefaultGroovyPageLocator#getPluginViewPathInfo(java.lang.String), org.grails.gsp.io.DefaultGroovyPageLocator#isReloadEnabled(), org.grails.gsp.io.DefaultGroovyPageLocator#setReloadEnabled(boolean), org.grails.gsp.io.DefaultGroovyPageLocator#wait(long, int), org.grails.gsp.io.DefaultGroovyPageLocator#wait(long), org.grails.gsp.io.DefaultGroovyPageLocator#wait(), org.grails.gsp.io.DefaultGroovyPageLocator#equals(java.lang.Object), org.grails.gsp.io.DefaultGroovyPageLocator#toString(), org.grails.gsp.io.DefaultGroovyPageLocator#hashCode(), org.grails.gsp.io.DefaultGroovyPageLocator#getClass(), org.grails.gsp.io.DefaultGroovyPageLocator#notify(), org.grails.gsp.io.DefaultGroovyPageLocator#notifyAll() |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Finds a template for the given controller name and template name
controllerName
- The controller nametemplateName
- The view nameFinds a template for the given controller name and template name
controller
- The controller ntemplateName
- The view nameFinds a template for the given given template name, looking up the controller from the request as necessary
templateName
- The template nameFind a template for a path. For example /foo/bar will search for /WEB-INF/grails-app/views/foo/_bar.gsp in production and grails-app/views/foo/_bar.gsp at development time
uri
- The uri to searchFinds a template for the given given template name, looking up the controller from the request as necessary
templateName
- The template nameFinds a template for the given given template name, looking up the controller from the request as necessary
pluginName
- The plugintemplateName
- The template namebinding
- The bindingFinds a template for the given given template name, looking up the controller from the request as necessary
templateName
- The template nameFinds a template for the given given template name, looking up the controller from the request as necessary
pluginName
- The plugintemplateName
- The template namebinding
- The binding
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 name
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 nameFinds a view for the given given view name, looking up the controller from the request as necessary
viewName
- The view nameFind a view for a path. For example /foo/bar will search for /WEB-INF/grails-app/views/foo/bar.gsp in production and grails-app/views/foo/bar.gsp at development time
uri
- The uri to searchFinds a view for the given view name and format, otherwise returns null if it doesn't exist
controllerName
- The controller nameviewName
- The view nameformat
- The format