|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object groovy.lang.GroovyObjectSupport groovy.lang.Script org.codehaus.groovy.grails.web.pages.GroovyPage
public abstract class GroovyPage
NOTE: Based on work done by on the GSP standalone project (https://gsp.dev.java.net/) Base class for a GroovyPage (at the moment there is nothing in here but could be useful for providing utility methods etc.
Nested Class Summary | |
---|---|
static class |
GroovyPage.ConstantClosure
|
Field Summary | |
---|---|
static String |
ACTION_NAME
|
static String |
APPLICATION_CONTEXT
|
static String |
ATTRIBUTES
|
static String |
CONTROLLER_NAME
|
static String |
DEFAULT_NAMESPACE
|
protected static groovy.lang.Closure |
EMPTY_BODY_CLOSURE
|
static String |
EXTENSION
|
static String |
FLASH
|
static String |
LINK_NAMESPACE
|
static String |
OUT
|
static String |
PAGE_SCOPE
|
static String |
PARAMS
|
static String |
PLUGIN_CONTEXT_PATH
|
static String |
REQUEST
|
static Collection<String> |
RESERVED_NAMES
|
static String |
RESPONSE
|
static String |
SERVLET_CONTEXT
|
static String |
SESSION
|
static String |
SUFFIX
|
static String |
TEMPLATE_NAMESPACE
|
static String |
WEB_REQUEST
|
Constructor Summary | |
---|---|
GroovyPage()
|
Method Summary | |
---|---|
static Object |
captureTagOutput(TagLibraryLookup gspTagLibraryLookup,
String namespace,
String tagName,
Map attrs,
Object body,
GrailsWebRequest webRequest)
|
void |
cleanup()
|
protected groovy.lang.Closure |
createClosureForHtmlPart(int partNumber)
|
static groovy.lang.Closure |
createOutputCapturingClosure(Object wrappedInstance,
Object body1,
GrailsWebRequest webRequest,
boolean preferSubChunkWhenWritingToOtherBuffer)
|
Object |
evaluate(String exprText,
int lineNumber,
Object outerIt,
groovy.lang.Closure evaluator)
In the development environment this method is used to evaluate expressions and improve error reporting |
abstract String |
getGroovyPageFileName()
|
String[] |
getHtmlParts()
|
Writer |
getOut()
|
GroovyPageOutputStack |
getOutputStack()
|
String |
getPluginContextPath()
|
Object |
getProperty(String property)
|
(package private) TagLibraryResolver |
getTagLibraryResolver()
Obtains a reference to the JSP tag library resolver instance |
protected void |
init()
|
void |
initRun(Writer target,
GrailsWebRequest webRequest)
|
Object |
invokeMethod(String methodName,
Object args)
Allows invoking of taglibs as method calls with simple bodies. |
void |
invokeTag(String tagName,
Map attrs,
groovy.lang.Closure body)
Attempts to invokes a dynamic tag |
void |
invokeTag(String tagName,
String tagNamespace,
int lineNumber,
Map attrs,
groovy.lang.Closure body)
|
void |
invokeTag(String tagName,
String tagNamespace,
Map attrs,
groovy.lang.Closure body)
Attempts to invokes a dynamic tag |
static boolean |
isReservedName(String name)
Return whether the given name cannot be used within the binding of a GSP |
void |
printHtmlPart(int partNumber)
|
void |
registerSitemeshPreprocessMode(HttpServletRequest request)
|
void |
setGspTagLibraryLookup(TagLibraryLookup gspTagLibraryLookup)
Sets the GSP tag library lookup class |
void |
setHtmlParts(String[] htmlParts)
|
void |
setJspTagLibraryResolver(TagLibraryResolver jspTagLibraryResolver)
Sets the JSP tag library resolver to use to resolve JSP tags |
void |
setJspTags(Map jspTags)
Sets the JSP tags used by this GroovyPage instance |
void |
setOut(Writer newWriter)
|
Methods inherited from class groovy.lang.Script |
---|
evaluate, evaluate, getBinding, print, println, println, run, run, setBinding, setProperty |
Methods inherited from class groovy.lang.GroovyObjectSupport |
---|
getMetaClass, setMetaClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REQUEST
public static final String SERVLET_CONTEXT
public static final String RESPONSE
public static final String OUT
public static final String ATTRIBUTES
public static final String APPLICATION_CONTEXT
public static final String SESSION
public static final String PARAMS
public static final String FLASH
public static final String PLUGIN_CONTEXT_PATH
public static final String EXTENSION
public static final String WEB_REQUEST
public static final String DEFAULT_NAMESPACE
public static final String LINK_NAMESPACE
public static final String TEMPLATE_NAMESPACE
public static final String PAGE_SCOPE
public static final String CONTROLLER_NAME
public static final String SUFFIX
public static final String ACTION_NAME
public static final Collection<String> RESERVED_NAMES
protected static final groovy.lang.Closure EMPTY_BODY_CLOSURE
Constructor Detail |
---|
public GroovyPage()
Method Detail |
---|
protected void init()
public Writer getOut()
public void setOut(Writer newWriter)
public void initRun(Writer target, GrailsWebRequest webRequest)
public String getPluginContextPath()
public void cleanup()
protected groovy.lang.Closure createClosureForHtmlPart(int partNumber)
public void setJspTagLibraryResolver(TagLibraryResolver jspTagLibraryResolver)
jspTagLibraryResolver
- The JSP tag resolvepublic void setGspTagLibraryLookup(TagLibraryLookup gspTagLibraryLookup)
gspTagLibraryLookup
- The class used to lookup a GSP tag libraryTagLibraryResolver getTagLibraryResolver()
public Object evaluate(String exprText, int lineNumber, Object outerIt, groovy.lang.Closure evaluator)
exprText
- The expression textlineNumber
- The line numberouterIt
- The other reference to the variable 'it'evaluator
- The expression evaluator
public abstract String getGroovyPageFileName()
public Object getProperty(String property)
getProperty
in interface groovy.lang.GroovyObject
getProperty
in class groovy.lang.Script
public void invokeTag(String tagName, Map attrs, groovy.lang.Closure body)
tagName
- The name of the tagattrs
- The tags attributesbody
- The body of the tag as a closurepublic void invokeTag(String tagName, String tagNamespace, Map attrs, groovy.lang.Closure body)
tagName
- The name of the tagtagNamespace
- The taglib's namespaceattrs
- The tags attributesbody
- The body of the tag as a closurepublic void invokeTag(String tagName, String tagNamespace, int lineNumber, Map attrs, groovy.lang.Closure body)
public Object invokeMethod(String methodName, Object args)
invokeMethod
in interface groovy.lang.GroovyObject
invokeMethod
in class groovy.lang.Script
methodName
- The methodName of the tag to call or the methodName of a method on GroovPageargs
- The Arguments
public static Object captureTagOutput(TagLibraryLookup gspTagLibraryLookup, String namespace, String tagName, Map attrs, Object body, GrailsWebRequest webRequest)
public static groovy.lang.Closure createOutputCapturingClosure(Object wrappedInstance, Object body1, GrailsWebRequest webRequest, boolean preferSubChunkWhenWritingToOtherBuffer)
public static boolean isReservedName(String name)
name
- True if it can't
public final void printHtmlPart(int partNumber)
public void setJspTags(Map jspTags)
jspTags
- The JSP tags usedpublic String[] getHtmlParts()
public void setHtmlParts(String[] htmlParts)
public GroovyPageOutputStack getOutputStack()
public void registerSitemeshPreprocessMode(HttpServletRequest request)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |