org.apache.tapestry5.internal.services
Interface DocumentLinker

All Known Implementing Classes:
DocumentLinkerImpl, PartialMarkupDocumentLinker

public interface DocumentLinker

Responsible for injecting script and style links into the <head> and <body> element of the rendered HTML document.


Method Summary
 void addScript(String script)
          Adds JavaScript code.
 void addScriptLink(String scriptURL)
          Adds a link to load a script.
 void addStylesheetLink(String styleURL, String media)
          Adds a link to load a CSS stylesheet.
 

Method Detail

addScriptLink

void addScriptLink(String scriptURL)
Adds a link to load a script. Scripts will be loaded only once. The <script> elements will be added at the top or bottom of the <body> element (the location is configurable).


addStylesheetLink

void addStylesheetLink(String styleURL,
                       String media)
Adds a link to load a CSS stylesheet. Stylesheets are loaded only once.

Parameters:
styleURL - URL of stylesheet to load
media - media value (or null to omit the media attribute)

addScript

void addScript(String script)
Adds JavaScript code. The code is collected into a single block that is injected just before the close body tag of the page.

Parameters:
script - statement to add to the block (a newline will be appended as well)


Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.