Class GSPSitemeshPage

java.lang.Object
com.opensymphony.module.sitemesh.parser.AbstractPage
com.opensymphony.module.sitemesh.parser.AbstractHTMLPage
org.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 and body contents. No html parsing is required for templating since capture tags are added at GSP compilation time.
  • Constructor Details

    • GSPSitemeshPage

      public GSPSitemeshPage()
    • GSPSitemeshPage

      public GSPSitemeshPage(boolean renderingLayout)
  • Method Details

    • reset

      public void reset()
    • addProperty

      public void addProperty(String name, Object value)
    • addProperty

      public void addProperty(String name, String value)
      Specified by:
      addProperty in interface com.opensymphony.sitemesh.Content
      Specified by:
      addProperty in interface com.opensymphony.module.sitemesh.Page
      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.sitemesh.Content
      Specified by:
      writeHead in interface com.opensymphony.module.sitemesh.HTMLPage
      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.sitemesh.Content
      Specified by:
      writeBody in interface com.opensymphony.module.sitemesh.Page
      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(org.grails.buffer.StreamCharBuffer headBuffer)
    • setBodyBuffer

      public void setBodyBuffer(org.grails.buffer.StreamCharBuffer bodyBuffer)
    • setPageBuffer

      public void setPageBuffer(org.grails.buffer.StreamCharBuffer pageBuffer)
    • setTitleBuffer

      public void setTitleBuffer(org.grails.buffer.StreamCharBuffer titleBuffer)
    • getTitleBuffer

      public org.grails.buffer.StreamCharBuffer getTitleBuffer()
    • isUsed

      public boolean isUsed()
    • setUsed

      public void setUsed(boolean used)
    • setContentBuffer

      public void setContentBuffer(String tagName, org.grails.buffer.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:
      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)