|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tapestry.util.PageRenderSupportImpl
public class PageRenderSupportImpl
Implementation of PageRenderSupport
. The
Body
component uses an instance of this class.
Constructor Summary | |
---|---|
PageRenderSupportImpl(AssetFactory assetFactory,
java.lang.String namespace,
org.apache.hivemind.Location location)
|
Method Summary | |
---|---|
void |
addBodyScript(java.lang.String script)
Adds scripting code to the main body. |
void |
addExternalScript(org.apache.hivemind.Resource scriptLocation)
Adds an external script. |
void |
addInitializationScript(java.lang.String script)
Adds initialization script. |
org.apache.hivemind.Location |
getLocation()
Returns the location, which may be used in error messages. |
java.lang.String |
getPreloadedImageReference(java.lang.String URL)
Sets up the given URL to preload, and returns a reference to the loaded image, in the form of a snippet of JavaScript expression that can be inserted into some larger block of JavaScript as a function parameter, or as a property assignment. |
java.lang.String |
getUniqueString(java.lang.String baseValue)
Ensures that the given string is unique. |
void |
writeBodyScript(IMarkupWriter writer,
IRequestCycle cycle)
Writes a single large JavaScript block containing: Any image initializations (via getPreloadedImageReference(String) )
Any included scripts (via addExternalScript(Resource) )
Any contributions (via addBodyScript(String) )
|
void |
writeInitializationScript(IMarkupWriter writer)
Writes any image initializations; this should be invoked at the end of the render, after all the related HTML will have already been streamed to the client and parsed by the web browser. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PageRenderSupportImpl(AssetFactory assetFactory, java.lang.String namespace, org.apache.hivemind.Location location)
Method Detail |
---|
public org.apache.hivemind.Location getLocation()
Body
component.
getLocation
in interface org.apache.hivemind.Locatable
public java.lang.String getPreloadedImageReference(java.lang.String URL)
PageRenderSupport
tapestry_preload[7].src
.
getPreloadedImageReference
in interface PageRenderSupport
public void addBodyScript(java.lang.String script)
IScriptProcessor
Body
component will write the body script contents
just inside the <body>
tag.
addBodyScript
in interface IScriptProcessor
public void addInitializationScript(java.lang.String script)
IScriptProcessor
</body> tag).
- Specified by:
addInitializationScript
in interface IScriptProcessor
public void addExternalScript(org.apache.hivemind.Resource scriptLocation)
IScriptProcessor
addExternalScript
in interface IScriptProcessor
public java.lang.String getUniqueString(java.lang.String baseValue)
IScriptProcessor
getUniqueString
in interface IScriptProcessor
public void writeBodyScript(IMarkupWriter writer, IRequestCycle cycle)
getPreloadedImageReference(String)
)
addExternalScript(Resource)
)
addBodyScript(String)
)
writeInitializationScript(IMarkupWriter)
public void writeInitializationScript(IMarkupWriter writer)
window.onload
event handler.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |