|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PageRenderSupport
Provides support to all components that render. This is primarily about generating unique client-side ids (very important for JavaScript generation) as well as accumulating JavaScript to be sent to the client. PageRenderSupport also allows for the incremental addition of stylesheets.
| Method Summary | |
|---|---|
void |
addClasspathScriptLink(String... classpaths)
Used to add scripts that are stored on the classpath. |
void |
addScript(String format,
Object... arguments)
Adds a script statement to the page's script block (which appears at the end of the page, just before the </body> tag). |
void |
addScriptLink(Asset... scriptAssets)
Adds one or more new script assets to the page. |
void |
addStylesheetLink(Asset stylesheet,
String media)
Adds a link to a CSS stylesheet. |
String |
allocateClientId(ComponentResources resources)
As with allocateClientId(String) but uses the id of the component extracted from the resources. |
String |
allocateClientId(String id)
Allocates a unique id based on the component's id. |
| Method Detail |
|---|
String allocateClientId(String id)
id - the component id from which a unique id will be generated
IdAllocatorString allocateClientId(ComponentResources resources)
allocateClientId(String) but uses the id of the component extracted from the resources.
resources - of the component which requires an id
void addScriptLink(Asset... scriptAssets)
scriptAssets - asset to the script to addvoid addClasspathScriptLink(String... classpaths)
classpaths - array of paths. Symbols in the paths are expanded, then the paths are each converted into an
asset.
void addStylesheetLink(Asset stylesheet,
String media)
stylesheet - the asset referencing the stylesheetmedia - the media value for the stylesheet, or null to not specify a specific media type
void addScript(String format,
Object... arguments)
format - base string format, to be passed through String.formatarguments - additional arguments formatted to form the final script
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||