|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.web.pages.GroovyPageWritable
class GroovyPageWritable
An instance of groovy.lang.Writable that writes itself to the specified writer, typically the response writer
Constructor Summary | |
---|---|
GroovyPageWritable(GroovyPageMetaInfo metaInfo)
|
Method Summary | |
---|---|
protected void |
copyBinding(groovy.lang.Binding binding,
groovy.lang.Binding oldBinding,
Writer out)
|
protected void |
formulateBinding(HttpServletRequest request,
HttpServletResponse response,
groovy.lang.Binding binding,
Writer out)
Prepare Bindings before instantiating page. |
protected void |
populateViewModel(HttpServletRequest request,
groovy.lang.Binding binding)
|
void |
setBinding(Map binding)
This sets any additional variables that need to be placed in the Binding of the GSP page. |
void |
setShowSource(boolean showSource)
Set to true if the generated source should be output instead |
protected void |
writeGroovySourceToResponse(GroovyPageMetaInfo info,
Writer out)
Writes the Groovy source code attached to the given info object to the response, prefixing each line with its line number. |
protected void |
writeInputStreamToResponse(InputStream in,
Writer out)
Copy all of input to output. |
Writer |
writeTo(Writer out)
Writes the template to the specified Writer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GroovyPageWritable(GroovyPageMetaInfo metaInfo)
Method Detail |
---|
public void setBinding(Map binding)
binding
- The additional variablespublic void setShowSource(boolean showSource)
showSource
- True if source output should be outputpublic Writer writeTo(Writer out) throws IOException
writeTo
in interface groovy.lang.Writable
out
- The Writer to write to, normally the HttpServletResponse
IOException
protected void copyBinding(groovy.lang.Binding binding, groovy.lang.Binding oldBinding, Writer out) throws IOException
IOException
protected void writeInputStreamToResponse(InputStream in, Writer out) throws IOException
in
- The input stream to writeInputStreamToResponse fromout
- The output to write to
IOException
- When an error occurs writing to the response Writerprotected void writeGroovySourceToResponse(GroovyPageMetaInfo info, Writer out) throws IOException
info
- The meta info for the GSP page that we want to write
the generated source for.out
- The writer to send the source to.
IOException
- If there is either a problem with the input
stream for the Groovy source, or the writer.protected void formulateBinding(HttpServletRequest request, HttpServletResponse response, groovy.lang.Binding binding, Writer out) throws IOException
request
- The HttpServletRequest instanceresponse
- The HttpServletResponse instanceout
- The response out
IOException
- Thrown when an IO error occurs creating the bindingprotected void populateViewModel(HttpServletRequest request, groovy.lang.Binding binding)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |