org.codehaus.groovy.grails.web.sitemesh
Class GSPSitemeshPage
java.lang.Object
com.opensymphony.module.sitemesh.parser.AbstractPage
com.opensymphony.module.sitemesh.parser.AbstractHTMLPage
org.codehaus.groovy.grails.web.sitemesh.GSPSitemeshPage
- All Implemented Interfaces:
- com.opensymphony.module.sitemesh.HTMLPage, com.opensymphony.module.sitemesh.Page, com.opensymphony.sitemesh.Content
public class GSPSitemeshPage
- extends com.opensymphony.module.sitemesh.parser.AbstractHTMLPage
- implements com.opensymphony.sitemesh.Content
Grails/GSP specific implementation of Sitemesh's AbstractHTMLPage
g:capture* tags in RenderTagLib are used to capture head, meta, title, component & body contents.
No html parsing is required for templating since capture tags are added at GSP compilation time.
- See Also:
SitemeshPreprocessor
| Fields inherited from class com.opensymphony.module.sitemesh.parser.AbstractPage |
pageData |
| Methods inherited from class com.opensymphony.module.sitemesh.parser.AbstractHTMLPage |
isFrameSet, setFrameSet |
| Methods inherited from class com.opensymphony.module.sitemesh.parser.AbstractPage |
getBooleanProperty, getContentLength, getIntProperty, getLongProperty, getProperties, getProperty, getPropertyKeys, getRequest, getTitle, isPropertySet, noNull, setRequest |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.opensymphony.sitemesh.Content |
getProperty, getPropertyKeys, getTitle |
| Methods inherited from interface com.opensymphony.module.sitemesh.Page |
getBooleanProperty, getContentLength, getIntProperty, getLongProperty, getProperties, getProperty, getPropertyKeys, getRequest, getTitle, isPropertySet, setRequest |
GSPSitemeshPage
public GSPSitemeshPage()
GSPSitemeshPage
public GSPSitemeshPage(boolean renderingLayout)
addProperty
public void addProperty(java.lang.String name,
java.lang.Object value)
addProperty
public void addProperty(java.lang.String name,
java.lang.String value)
- Specified by:
addProperty in interface com.opensymphony.module.sitemesh.Page- Specified by:
addProperty in interface com.opensymphony.sitemesh.Content- Overrides:
addProperty in class com.opensymphony.module.sitemesh.parser.AbstractPage
writeHead
public void writeHead(java.io.Writer out)
throws java.io.IOException
- Specified by:
writeHead in interface com.opensymphony.module.sitemesh.HTMLPage- Specified by:
writeHead in interface com.opensymphony.sitemesh.Content- Specified by:
writeHead in class com.opensymphony.module.sitemesh.parser.AbstractHTMLPage
- Throws:
java.io.IOException
writeBody
public void writeBody(java.io.Writer out)
throws java.io.IOException
- Specified by:
writeBody in interface com.opensymphony.module.sitemesh.Page- Specified by:
writeBody in interface com.opensymphony.sitemesh.Content- Specified by:
writeBody in class com.opensymphony.module.sitemesh.parser.AbstractPage
- Throws:
java.io.IOException
writePage
public void writePage(java.io.Writer out)
throws java.io.IOException
- Specified by:
writePage in interface com.opensymphony.module.sitemesh.Page- Overrides:
writePage in class com.opensymphony.module.sitemesh.parser.AbstractPage
- Throws:
java.io.IOException
getHead
public java.lang.String getHead()
- Specified by:
getHead in interface com.opensymphony.module.sitemesh.HTMLPage
getBody
public java.lang.String getBody()
- Specified by:
getBody in interface com.opensymphony.module.sitemesh.Page- Overrides:
getBody in class com.opensymphony.module.sitemesh.parser.AbstractPage
getPage
public java.lang.String getPage()
- Specified by:
getPage in interface com.opensymphony.module.sitemesh.Page- Overrides:
getPage in class com.opensymphony.module.sitemesh.parser.AbstractPage
originalLength
public int originalLength()
- Specified by:
originalLength in interface com.opensymphony.sitemesh.Content
writeOriginal
public void writeOriginal(java.io.Writer writer)
throws java.io.IOException
- Specified by:
writeOriginal in interface com.opensymphony.sitemesh.Content
- Throws:
java.io.IOException
setHeadBuffer
public void setHeadBuffer(StreamCharBuffer headBuffer)
setBodyBuffer
public void setBodyBuffer(StreamCharBuffer bodyBuffer)
setPageBuffer
public void setPageBuffer(StreamCharBuffer pageBuffer)
setTitleBuffer
public void setTitleBuffer(StreamCharBuffer titleBuffer)
getTitleBuffer
public StreamCharBuffer getTitleBuffer()
isUsed
public boolean isUsed()
setUsed
public void setUsed(boolean used)
setContentBuffer
public void setContentBuffer(java.lang.String tagName,
StreamCharBuffer buffer)
- Parameters:
tagName - "tagName" name of buffer (without "page." prefix)buffer -
getContentBuffer
public java.lang.Object getContentBuffer(java.lang.String name)
- Parameters:
name - propertyName of contentBuffer (with "page." prefix)
- Returns:
- the buffer for the specified name
content2htmlPage
public static com.opensymphony.module.sitemesh.HTMLPage content2htmlPage(com.opensymphony.sitemesh.Content content)
isTitleCaptured
public boolean isTitleCaptured()
setTitleCaptured
public void setTitleCaptured(boolean titleCaptured)