org.codehaus.groovy.grails.web.pages
Class GroovyPageUtils

java.lang.Object
  extended by org.codehaus.groovy.grails.web.pages.GroovyPageUtils

public class GroovyPageUtils
extends Object

Methods to establish template names, paths and so on.

Since:
1.1.1

Created: May 1, 2009

Author:
Graeme Rocher

Field Summary
static String PATH_TO_VIEWS
           
 
Constructor Summary
GroovyPageUtils()
           
 
Method Summary
static String getDeployedViewURI(String controllerName, String viewName)
          Obtains a view URI when deployed within the /WEB-INF/grails-app/views context
static String getNoSuffixViewURI(groovy.lang.GroovyObject controller, String viewName)
          Obtains a view URI of the given controller and view name without the suffix
static String getNoSuffixViewURI(String controllerName, String viewName)
          Obtains a view URI of the given controller name and view name without the suffix
static String getTemplateURI(groovy.lang.GroovyObject controller, String templateName)
          Obtains a template URI for the given controller instance and template name
static String getTemplateURI(String controllerName, String templateName)
          Obtains the URI to a template using the controller name and template name
static String getViewURI(groovy.lang.GroovyObject controller, String viewName)
          Obtains a view URI of the given controller and view name
static String getViewURI(String controllerName, String viewName)
          Obtains a view URI of the given controller name and view name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATH_TO_VIEWS

public static final String PATH_TO_VIEWS
See Also:
Constant Field Values
Constructor Detail

GroovyPageUtils

public GroovyPageUtils()
Method Detail

getTemplateURI

public static String getTemplateURI(groovy.lang.GroovyObject controller,
                                    String templateName)
Obtains a template URI for the given controller instance and template name

Parameters:
controller - The controller instance
templateName - The template name
Returns:
The template URI

getViewURI

public static String getViewURI(groovy.lang.GroovyObject controller,
                                String viewName)
Obtains a view URI of the given controller and view name

Parameters:
controller - The name of the controller
viewName - The name of the view
Returns:
The view URI

getNoSuffixViewURI

public static String getNoSuffixViewURI(groovy.lang.GroovyObject controller,
                                        String viewName)
Obtains a view URI of the given controller and view name without the suffix

Parameters:
controller - The name of the controller
viewName - The name of the view
Returns:
The view URI

getTemplateURI

public static String getTemplateURI(String controllerName,
                                    String templateName)
Obtains the URI to a template using the controller name and template name

Parameters:
controllerName - The controller name
templateName - The template name
Returns:
The template URI

getViewURI

public static String getViewURI(String controllerName,
                                String viewName)
Obtains a view URI of the given controller name and view name

Parameters:
controllerName - The name of the controller
viewName - The name of the view
Returns:
The view URI

getNoSuffixViewURI

public static String getNoSuffixViewURI(String controllerName,
                                        String viewName)
Obtains a view URI of the given controller name and view name without the suffix

Parameters:
controllerName - The name of the controller
viewName - The name of the view
Returns:
The view URI

getDeployedViewURI

public static String getDeployedViewURI(String controllerName,
                                        String viewName)
Obtains a view URI when deployed within the /WEB-INF/grails-app/views context

Parameters:
controllerName - The name of the controller
viewName - The name of the view
Returns:
The view URI


Copyright (c) 2005-2009 The Grails project