|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tapestry.javascript.JavascriptManagerImpl
public class JavascriptManagerImpl
An implementation that accepts a comma separated String for files, formFiles and widgetFiles.
Constructor Summary | |
---|---|
JavascriptManagerImpl()
|
Method Summary | |
---|---|
protected void |
appendAssetAsJavascript(IMarkupWriter writer,
IRequestCycle cycle,
IAsset asset)
Appends a script tag to include the given asset. |
protected void |
appendAssetsAsJavascript(IMarkupWriter writer,
IRequestCycle cycle,
List jsAssets)
|
protected List |
buildAssetList(String files,
String name)
Builds a List of IAsset from a comma
separated input string. |
protected IAsset |
findAsset(String path,
String description)
Finds the given asset (in classpath, context, e.t.c.). |
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. |
void |
setAssetSource(AssetSource assetSource)
|
void |
setFiles(String files)
|
void |
setFolder(String path)
|
void |
setFormFiles(String formFiles)
|
void |
setTapestryFile(String tapestryFile)
|
void |
setTapestryFolder(String tapestryPath)
|
void |
setWidgetFiles(String widgetFiles)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavascriptManagerImpl()
Method Detail |
---|
public IAsset getFirstAsset()
getFirstAsset
in interface JavascriptManager
public IAsset getFirstFormAsset()
getFirstFormAsset
in interface JavascriptManager
public IAsset getFirstWidgetAsset()
getFirstWidgetAsset
in interface JavascriptManager
public List getAssets()
JavascriptManager
getAssets
in interface JavascriptManager
IAsset
s.public List getFormAssets()
JavascriptManager
getFormAssets
in interface JavascriptManager
IAsset
s.public List getWidgetAssets()
JavascriptManager
getWidgetAssets
in interface JavascriptManager
IAsset
s.public IAsset getPath()
JavascriptManager
getPath
in interface JavascriptManager
public IAsset getTapestryAsset()
JavascriptManager
getTapestryAsset
in interface JavascriptManager
public IAsset getTapestryPath()
JavascriptManager
getTapestryPath
in interface JavascriptManager
public void setFiles(String files)
public void setFormFiles(String formFiles)
public void setWidgetFiles(String widgetFiles)
public void setFolder(String path)
public void setTapestryFile(String tapestryFile)
public void setTapestryFolder(String tapestryPath)
public void setAssetSource(AssetSource assetSource)
public void renderLibraryResources(IMarkupWriter writer, IRequestCycle cycle, boolean hasForm, boolean hasWidget)
JavascriptManager
renderLibraryResources
in interface JavascriptManager
hasForm
- true if current page includes forms.hasWidget
- true if current page includes widgets.public void renderLibraryAdaptor(IMarkupWriter writer, IRequestCycle cycle)
JavascriptManager
renderLibraryAdaptor
in interface JavascriptManager
protected void appendAssetAsJavascript(IMarkupWriter writer, IRequestCycle cycle, IAsset asset)
writer
- cycle
- asset
- protected void appendAssetsAsJavascript(IMarkupWriter writer, IRequestCycle cycle, List jsAssets)
protected List buildAssetList(String files, String name)
List
of IAsset
from a comma
separated input string.
files
- A comma separated string.name
- Description of assets.
protected IAsset findAsset(String path, String description)
path
- description
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |