org.apache.tapestry.javascript
Class SimpleAjaxShellDelegate

java.lang.Object
  extended by org.apache.tapestry.javascript.SimpleAjaxShellDelegate
All Implemented Interfaces:
IRender

public class SimpleAjaxShellDelegate
extends Object
implements IRender

Outputs the main js packages and the tapestry js that are defined by the JavascriptManager service.


Constructor Summary
SimpleAjaxShellDelegate(JavascriptManager javascriptManager)
           
 
Method Summary
protected  void appendAssetAsJavascript(StringBuffer str, IRequestCycle cycle, IAsset asset)
          Appends a script tag to include the given asset.
protected  void processPath(StringBuffer str, IRequestCycle cycle, IAsset path)
          Called before including any javascript.
protected  void processTapestryPath(StringBuffer str, IRequestCycle cycle, IAsset path)
          Called before including tapestry's base javascript.
 void render(IMarkupWriter writer, IRequestCycle cycle)
          The principal rendering/rewinding method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleAjaxShellDelegate

public SimpleAjaxShellDelegate(JavascriptManager javascriptManager)
Method Detail

render

public void render(IMarkupWriter writer,
                   IRequestCycle cycle)
The principal rendering/rewinding method. This will cause the receiving component to render its top level elements (HTML text and components).

Renderring and rewinding are the exact same process. The same code that renders must be able to restore state by going through the exact same operations (even though the output is discarded).

Specified by:
render in interface IRender

processPath

protected void processPath(StringBuffer str,
                           IRequestCycle cycle,
                           IAsset path)
Called before including any javascript. It does nothing by default, but allows subclasses to change this behavior.

Parameters:
cycle -
str -
path - The base path to the javascript files. May be null.

processTapestryPath

protected void processTapestryPath(StringBuffer str,
                                   IRequestCycle cycle,
                                   IAsset path)
Called before including tapestry's base javascript. It does nothing by default, but allows subclasses to change this behavior.

Parameters:
cycle -
str -
path - The base path to the tapestry javascript file. May be null.

appendAssetAsJavascript

protected void appendAssetAsJavascript(StringBuffer str,
                                       IRequestCycle cycle,
                                       IAsset asset)
Appends a script tag to include the given asset.

Parameters:
str -
cycle -
asset -


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