org.apache.tapestry
Interface PageRenderSupport

All Superinterfaces:
IScriptProcessor
All Known Subinterfaces:
ResponseBuilder
All Known Implementing Classes:
DefaultResponseBuilder, DojoAjaxResponseBuilder, JSONResponseBuilder, PageRenderSupportImpl, PrototypeResponseBuilder

public interface PageRenderSupport
extends IScriptProcessor

Extends IScriptProcessor with a handful of additional methods needed when rendering a page response.

Since:
4.0
Author:
Howard M. Lewis Ship
See Also:
Body, TapestryUtils.getPageRenderSupport(IRequestCycle, IComponent)

Method Summary
 String getPreloadedImageReference(IComponent target, IAsset source)
          Operates in the same way that getPreloadedImageReference(IComponent, String) does, except the source is the actual IAsset of an image to preload.
 String getPreloadedImageReference(IComponent target, 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.
 String getPreloadedImageReference(String url)
          Deprecated. To be removed in 4.2, use getPreloadedImageReference(IComponent, String) or getPreloadedImageReference(IComponent, IAsset) instead.
 
Methods inherited from interface org.apache.tapestry.IScriptProcessor
addBodyScript, addBodyScript, addExternalScript, addExternalScript, addInitializationScript, addInitializationScript, addScriptAfterInitialization, getUniqueString, isBodyScriptAllowed, isExternalScriptAllowed, isInitializationScriptAllowed
 

Method Detail

getPreloadedImageReference

String getPreloadedImageReference(String url)
Deprecated. To be removed in 4.2, use getPreloadedImageReference(IComponent, String) or getPreloadedImageReference(IComponent, IAsset) instead.

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. A typical return value might be tapestry_preload[7].src.

Parameters:
url - The url to the resource to be preloaded.
Returns:
Reference to preload image url.

getPreloadedImageReference

String getPreloadedImageReference(IComponent target,
                                  IAsset source)
Operates in the same way that getPreloadedImageReference(IComponent, String) does, except the source is the actual IAsset of an image to preload.

Parameters:
target - The component the asset is being loaded for.
source - The asset image to preload.
Returns:
The url representing the image that can be safely retrieved by the browser to see it.

getPreloadedImageReference

String getPreloadedImageReference(IComponent target,
                                  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. A typical return value might be tapestry_preload[7].src.

Parameters:
target - The component url being loaded for.
url - The asset URL to preload.
Returns:
Reference to preload image url.


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