org.apache.tapestry5.internal.services
Class PartialMarkupDocumentLinker

java.lang.Object
  extended by org.apache.tapestry5.internal.services.PartialMarkupDocumentLinker
All Implemented Interfaces:
DocumentLinker

public class PartialMarkupDocumentLinker
extends Object
implements DocumentLinker


Constructor Summary
PartialMarkupDocumentLinker()
           
 
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.
 void commit(JSONObject reply)
          Commits changes, adding one or more keys to the reply.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartialMarkupDocumentLinker

public PartialMarkupDocumentLinker()
Method Detail

addScriptLink

public void addScriptLink(String scriptURL)
Description copied from interface: DocumentLinker
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).

Specified by:
addScriptLink in interface DocumentLinker

addStylesheetLink

public void addStylesheetLink(String styleURL,
                              String media)
Description copied from interface: DocumentLinker
Adds a link to load a CSS stylesheet. Stylesheets are loaded only once.

Specified by:
addStylesheetLink in interface DocumentLinker
Parameters:
styleURL - URL of stylesheet to load
media - media value (or null to omit the media attribute)

addScript

public void addScript(String script)
Description copied from interface: DocumentLinker
Adds JavaScript code. The code is collected into a single block that is injected just before the close body tag of the page.

Specified by:
addScript in interface DocumentLinker
Parameters:
script - statement to add to the block (a newline will be appended as well)

commit

public void commit(JSONObject reply)
Commits changes, adding one or more keys to the reply.

Parameters:
reply - JSON Object to be sent to client


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