## 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.

Author:
  Lari Hotari, Sagire Software Oy
See Also:
  `SitemeshPreprocessor`

Field Summary
`(package private) StreamCharBuffer` `bodyBuffer`
`(package private) Map<String,StreamCharBuffer>` `contentBuffers`
`(package private) StreamCharBuffer` `headBuffer`
`(package private) StreamCharBuffer` `pageBuffer`
`(package private) boolean` `titleCaptured`
`(package private) boolean` `used`

Fields inherited from class com.opensymphony.module.sitemesh.parser.AbstractPage
`pageData`

Constructor Summary
`GSPSitemeshPage()`

Method Summary
`void` `addProperty(String name, Object value)`
`void` `addProperty(String name, String value)`
`String` `getBody()`
`Object` `getContentBuffer(String name)`
`String` `getHead()`
`String` `getPage()`
`boolean` `isUsed()`
`int` `originalLength()`
`void` `setBodyBuffer(StreamCharBuffer bodyBuffer)`
`void` `setContentBuffer(String tagName, StreamCharBuffer buffer)`
`void` `setHeadBuffer(StreamCharBuffer headBuffer)`
`void` `setPageBuffer(StreamCharBuffer pageBuffer)`
`void` `setUsed(boolean used)`
`void` `writeBody(Writer out)`
`void` `writeHead(Writer out)`
`void` `writeOriginal(Writer writer)`
`void` `writePage(Writer out)`

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`

Field Detail

### headBuffer

    StreamCharBuffer headBuffer

### bodyBuffer

    StreamCharBuffer bodyBuffer

### pageBuffer

    StreamCharBuffer pageBuffer

### used

    boolean used

### titleCaptured

    boolean titleCaptured

### contentBuffers

    Map<String,StreamCharBuffer> contentBuffers

Constructor Detail

### GSPSitemeshPage

    public GSPSitemeshPage()

Method Detail

### addProperty

    public void addProperty(String name,
                            Object value)

### addProperty

    public void addProperty(String name,
                            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(Writer out)
                   throws 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:
    `IOException`

### writeBody

    public void writeBody(Writer out)
                   throws 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:
    `IOException`

### writePage

    public void writePage(Writer out)
                   throws IOException

  Specified by:
    `writePage` in interface `com.opensymphony.module.sitemesh.Page`
  Overrides:
    `writePage` in class `com.opensymphony.module.sitemesh.parser.AbstractPage`
  Throws:
    `IOException`

### getHead

    public String getHead()

  Specified by:
    `getHead` in interface `com.opensymphony.module.sitemesh.HTMLPage`

### getBody

    public String getBody()

  Specified by:
    `getBody` in interface `com.opensymphony.module.sitemesh.Page`
  Overrides:
    `getBody` in class `com.opensymphony.module.sitemesh.parser.AbstractPage`

### getPage

    public 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(Writer writer)
                       throws IOException

  Specified by:
    `writeOriginal` in interface `com.opensymphony.sitemesh.Content`
  Throws:
    `IOException`

### setHeadBuffer

    public void setHeadBuffer(StreamCharBuffer headBuffer)

### setBodyBuffer

    public void setBodyBuffer(StreamCharBuffer bodyBuffer)

### setPageBuffer

    public void setPageBuffer(StreamCharBuffer pageBuffer)

### isUsed

    public boolean isUsed()

### setUsed

    public void setUsed(boolean used)

### setContentBuffer

    public void setContentBuffer(String tagName,
                                 StreamCharBuffer buffer)

  Parameters:
    `tagName` - "tagName" name of buffer (without "page." prefix)
    `buffer` -

### getContentBuffer

    public Object getContentBuffer(String name)

  Parameters:
    `name` - propertyName of contentBuffer (with "page." prefix)
  Returns:

Copyright (c) 2005-2009 The Grails project