public class ScriptFactoryImpl extends ScriptFactory implements Serializable
| Constructor and Description |
|---|
ScriptFactoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
Script |
getScript(String sourceCode)
Returns a new instance of
Script with the specified source code. |
Script |
getScript(String sourceCode,
String[] modules,
Script.ModulesType modulesType)
Returns a new instance of
Script with the specified source code, modules, and type. |
ScriptFactory |
getWrapped()
Returns the wrapped factory instance if this factory decorates another.
|
getScriptInstance, getScriptInstancepublic Script getScript(String sourceCode)
ScriptFactoryScript 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.getScript in class ScriptFactorysourceCode - The source code of the Script.public Script getScript(String sourceCode, String[] modules, Script.ModulesType modulesType)
ScriptFactoryScript 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).getScript in class ScriptFactorysourceCode - The source code of the Script.modules - The modules which the Script depends on.modulesType - The Script.ModulesType of the Script.public ScriptFactory getWrapped()
ScriptFactorygetWrapped in interface javax.faces.FacesWrapper<ScriptFactory>getWrapped in class ScriptFactoryCopyright © 2016 Liferay, Inc.. All rights reserved.