org.apache.tapestry.javascript
Interface JavascriptManager

All Known Implementing Classes:
JavascriptManagerImpl

public interface JavascriptManager

Manages javascript files of 3rd party libraries.


Method Summary
 List getAssets()
          The javascript files that should always be included.
 IAsset getFirstAsset()
           
 IAsset getFirstFormAsset()
           
 IAsset getFirstWidgetAsset()
           
 List getFormAssets()
          The javascript files that provide form-related functionality.
 IAsset getPath()
          The base path to the javascript files.
 IAsset getTapestryAsset()
          The tapestry js file.
 IAsset getTapestryPath()
          The base path to the tapestry js files.
 List getWidgetAssets()
          The javascript files that provide widget-related functionality.
 void renderLibraryAdaptor(IMarkupWriter writer, IRequestCycle cycle)
          Output the resources needed for tapestry in order to use the current javascript library.
 void renderLibraryResources(IMarkupWriter writer, IRequestCycle cycle, boolean hasForm, boolean hasWidget)
          Output the resources (could be .js, .css, e.t.c.
 

Method Detail

getAssets

List getAssets()
The javascript files that should always be included.

Returns:
A not-null (but possibly empty) list of IAssets.

getFirstAsset

IAsset getFirstAsset()

getFormAssets

List getFormAssets()
The javascript files that provide form-related functionality. They're dynamically included when the page contains forms.

Returns:
A not-null (but possibly empty) list of IAssets.

getFirstFormAsset

IAsset getFirstFormAsset()

getWidgetAssets

List getWidgetAssets()
The javascript files that provide widget-related functionality. They're dynamically included when the page contains widgets.

Returns:
A not-null (but possibly empty) list of IAssets.

getFirstWidgetAsset

IAsset getFirstWidgetAsset()

getPath

IAsset getPath()
The base path to the javascript files.

Returns:
if null, it is left unused.

getTapestryAsset

IAsset getTapestryAsset()
The tapestry js file.

Returns:
if null then no tapestry file is included.

getTapestryPath

IAsset getTapestryPath()
The base path to the tapestry js files.

Returns:
if null, it is left unused.

renderLibraryResources

void renderLibraryResources(IMarkupWriter writer,
                            IRequestCycle cycle,
                            boolean hasForm,
                            boolean hasWidget)
Output the resources (could be .js, .css, e.t.c. files) needed for the current javascript library.

Parameters:
writer -
cycle -
hasForm - true if current page includes forms.
hasWidget - true if current page includes widgets.

renderLibraryAdaptor

void renderLibraryAdaptor(IMarkupWriter writer,
                          IRequestCycle cycle)
Output the resources needed for tapestry in order to use the current javascript library.

Parameters:
writer -
cycle -


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