|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.groovy.grails.web.pages.discovery.DefaultGroovyPageLocator
org.codehaus.groovy.grails.web.pages.discovery.GrailsConventionGroovyPageLocator
public class GrailsConventionGroovyPageLocator
Extended GroovyPageLocator that deals with the details of Grails' conventions for controllers names, view names and template names
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.codehaus.groovy.grails.web.pages.discovery.DefaultGroovyPageLocator |
|---|
DefaultGroovyPageLocator.PluginViewPathInfo |
| Field Summary |
|---|
| Fields inherited from class org.codehaus.groovy.grails.web.pages.discovery.DefaultGroovyPageLocator |
|---|
pluginManager, reloadEnabled, resourceLoaders, warDeployed |
| Constructor Summary | |
|---|---|
GrailsConventionGroovyPageLocator()
|
|
| Method Summary | |
|---|---|
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 |
findViewByPath(java.lang.String uri)
Find a view for a path. |
protected java.lang.String |
getNameForController(java.lang.Object controller)
|
static java.lang.String |
resolveViewFormat(java.lang.String viewName)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GrailsConventionGroovyPageLocator()
| Method Detail |
|---|
public GroovyPageScriptSource findViewByPath(java.lang.String uri)
uri - The uri to search
public 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 name
public static 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 name
public GroovyPageScriptSource findTemplate(java.lang.String controllerName,
java.lang.String templateName)
controllerName - The controller nametemplateName - The view name
public GroovyPageScriptSource findTemplate(java.lang.Object controller,
java.lang.String templateName)
controller - The controller ntemplateName - The view name
public GroovyPageScriptSource findView(java.lang.String viewName)
viewName - The view name
public GroovyPageScriptSource findTemplate(java.lang.String templateName)
templateName - The template name
public GroovyPageScriptSource findTemplateInBinding(java.lang.String templateName,
GroovyPageBinding binding)
templateName - The template name
public GroovyPageScriptSource findTemplateInBinding(java.lang.String pluginName,
java.lang.String templateName,
GroovyPageBinding binding)
pluginName - The plugintemplateName - The template namebinding - The binding
public GroovyPageScriptSource findTemplateByPath(java.lang.String uri)
uri - The uri to search
protected java.lang.String getNameForController(java.lang.Object controller)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||