public abstract class ScriptFactory extends Object implements javax.faces.FacesWrapper<ScriptFactory>
Script which can be rendered on the client via FacesRequestContext.addScript(com.liferay.faces.util.client.Script).| Constructor and Description |
|---|
ScriptFactory() |
| Modifier and Type | Method and Description |
|---|---|
abstract Script |
getScript(String sourceCode)
Returns a new instance of
Script with the specified source code. |
abstract Script |
getScript(String sourceCode,
String[] modules,
Script.ModulesType modulesType)
Returns a new instance of
Script with the specified source code, modules, and type. |
static Script |
getScriptInstance(String sourceCode)
|
static Script |
getScriptInstance(String sourceCode,
String[] modules,
Script.ModulesType modulesType)
|
abstract ScriptFactory |
getWrapped()
Returns the wrapped factory instance if this factory decorates another.
|
public static Script getScriptInstance(String sourceCode)
Script from the ScriptFactory found by the FactoryExtensionFinder. The returned instance is guaranteed to be Serializable but not
guaranteed to be thread-safe.public static Script getScriptInstance(String sourceCode, String[] modules, Script.ModulesType modulesType)
Script from the ScriptFactory found by the FactoryExtensionFinder. The returned instance is guaranteed to be Serializable but not
guaranteed to be thread-safe.public abstract Script getScript(String sourceCode)
Script with the specified source code. The returned instance is guaranteed to
be Serializable but not guaranteed to be thread-safe. The Script can be rendered on the client
via FacesRequestContext.addScript(com.liferay.faces.util.client.Script).
As a convenience, it is possible to call FacesRequestContext.addScript(java.lang.String) instead since it will create the
Script and add it to the list of Scripts which will be rendered to the response.sourceCode - The source code of the Script.public abstract Script getScript(String sourceCode, String[] modules, Script.ModulesType modulesType)
Script with the specified source code, modules, and type. The returned instance
is guaranteed to be Serializable but not guaranteed to be thread-safe. The Script can be rendered
on the client via FacesRequestContext.addScript(com.liferay.faces.util.client.Script).sourceCode - The source code of the Script.modules - The modules which the Script depends on.modulesType - The Script.ModulesType of the Script.public abstract ScriptFactory getWrapped()
getWrapped in interface javax.faces.FacesWrapper<ScriptFactory>Copyright © 2016 Liferay, Inc.. All rights reserved.