|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry5.internal.services.RenderSupportImpl
public class RenderSupportImpl
| Constructor Summary | |
|---|---|
RenderSupportImpl(SymbolSource symbolSource,
AssetSource assetSource,
JavaScriptSupport javascriptSupport)
|
|
| Method Summary | |
|---|---|
void |
addClasspathScriptLink(String... classpaths)
Used to add scripts that are stored on the classpath. |
void |
addInit(String functionName,
JSONArray parameterList)
Add an initialization call. |
void |
addInit(String functionName,
JSONObject parameter)
Alternate version of RenderSupport.addInit(String, org.apache.tapestry5.json.JSONArray) where just a single object is
passed. |
void |
addInit(String functionName,
String... parameters)
Alternate version of RenderSupport.addInit(String, org.apache.tapestry5.json.JSONArray) where one or more strings are
passed. |
void |
addScript(String script)
Adds a script statement to the page's script block. |
void |
addScript(String format,
Object... arguments)
Adds a script statement to the page's script block. |
void |
addScriptLink(Asset... scriptAssets)
Adds one or more new script assets to the page. |
void |
addScriptLink(String... scriptURLs)
Adds some number of script links as strings representations of URLs. |
void |
addStylesheetLink(Asset stylesheet,
String media)
Adds a link to a CSS stylesheet. |
void |
addStylesheetLink(String stylesheetURL,
String media)
Adds a stylesheet as a URL. |
String |
allocateClientId(ComponentResources resources)
As with RenderSupport.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. |
void |
autofocus(FieldFocusPriority priority,
String fieldId)
Invoked to set focus on a rendered field. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RenderSupportImpl(SymbolSource symbolSource,
AssetSource assetSource,
JavaScriptSupport javascriptSupport)
symbolSource - Used to expand symbols (in addClasspathScriptLink(String...)assetSource - Used to convert classpath scripts to AssetsjavascriptSupport - Used to add JavaScript libraries and blocks of initialization JavaScript to the rendered page| Method Detail |
|---|
public String allocateClientId(String id)
RenderSupport
allocateClientId in interface RenderSupportid - the component id from which a unique id will be generated
IdAllocator,
JavaScriptSupport.allocateClientId(ComponentResources)public String allocateClientId(ComponentResources resources)
RenderSupportRenderSupport.allocateClientId(String) but uses the id of the component extracted from the resources.
allocateClientId in interface RenderSupportresources - of the component which requires an id
public void addScriptLink(Asset... scriptAssets)
RenderSupport
addScriptLink in interface RenderSupportscriptAssets - asset to the script to addpublic void addScriptLink(String... scriptURLs)
RenderSupport
addScriptLink in interface RenderSupportscriptURLs - URL strings of scriptspublic void addClasspathScriptLink(String... classpaths)
RenderSupport
addClasspathScriptLink in interface RenderSupportclasspaths - array of paths. Symbols in the paths are expanded, then the paths are each converted into an
asset.public void addScript(String script)
RenderSupport
addScript in interface RenderSupportscript - text to be added to the script block
public void addScript(String format,
Object... arguments)
RenderSupportString.format(String, Object[]) before being added to the script block. A newline will be added after the
formatted statement.
addScript in interface RenderSupportformat - base string format, to be passed through String.formatarguments - additional arguments formatted to form the final script
public void addInit(String functionName,
JSONArray parameterList)
RenderSupport
addInit in interface RenderSupportfunctionName - the name of the function (on the client-side Tapestry.Initializer object) to invoke.parameterList - list of parameters for the method invocation.RenderSupport.addScript(String, Object[])
public void addInit(String functionName,
JSONObject parameter)
RenderSupportRenderSupport.addInit(String, org.apache.tapestry5.json.JSONArray) where just a single object is
passed.
addInit in interface RenderSupportfunctionName - the name of the function (on the client-side Tapestry object) to invoke.parameter - the object to pass to the function
public void addInit(String functionName,
String... parameters)
RenderSupportRenderSupport.addInit(String, org.apache.tapestry5.json.JSONArray) where one or more strings are
passed. A single string is added to the initialization call as itself; otherwise, the parameters are combined to
form a JSONArray. This method is deprecated and, although it still works, it now generates
very verbose, inefficient client-side JavaScript.
addInit in interface RenderSupportfunctionName - the name of the function (on the client-side Tapestry object) to invoke.
public void autofocus(FieldFocusPriority priority,
String fieldId)
RenderSupportFieldFocusPriority.OVERRIDE can be used to force a particular field to receive
focus.
autofocus in interface RenderSupportpriority - focus is set only if the provided priority is greater than the current priorityfieldId - id of client-side element to take focus
public void addStylesheetLink(Asset stylesheet,
String media)
RenderSupport
addStylesheetLink in interface RenderSupportstylesheet - the asset referencing the stylesheetmedia - the media value for the stylesheet, or null to not specify a specific media type
public void addStylesheetLink(String stylesheetURL,
String media)
RenderSupportRenderSupport.addScriptLink(String[]).
addStylesheetLink in interface RenderSupportstylesheetURL - URL string of stylesheetmedia - media value for the stylesheet, or null to not specify a specific media type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||