|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.faces.util.client.ScriptFactory
public abstract class ScriptFactory
A factory for creating a Script which can be rendered on the client via FacesContextHelperUtil.addScript(javax.faces.context.FacesContext,
com.liferay.faces.util.client.Script).
| Constructor Summary | |
|---|---|
ScriptFactory()
|
|
| Method Summary | |
|---|---|
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(javax.faces.context.ExternalContext externalContext,
String sourceCode)
Returns a new instance of Script from the ScriptFactory found by the FactoryExtensionFinder. |
static Script |
getScriptInstance(javax.faces.context.ExternalContext externalContext,
String sourceCode,
String[] modules,
Script.ModulesType modulesType)
Returns a new instance of Script from the ScriptFactory found by the FactoryExtensionFinder. |
static Script |
getScriptInstance(String sourceCode)
Deprecated. Call getScriptInstance(ExternalContext, String) instead.
Returns a new instance of |
static Script |
getScriptInstance(String sourceCode,
String[] modules,
Script.ModulesType modulesType)
Deprecated. Call getScriptInstance(ExternalContext, String, String[], Script.ModulesType) instead.
Returns a new instance of |
abstract ScriptFactory |
getWrapped()
Returns the wrapped factory instance if this factory decorates another. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ScriptFactory()
| Method Detail |
|---|
@Deprecated public static Script getScriptInstance(String sourceCode)
getScriptInstance(ExternalContext, String) instead.
Returns a new instance of Script from the ScriptFactory found by the FactoryExtensionFinder. The returned instance is guaranteed to be Serializable but
not guaranteed to be thread-safe.
sourceCode - The source code of the script.
public static Script getScriptInstance(javax.faces.context.ExternalContext externalContext,
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.
externalContext - The external context associated with the current faces context. It is needed in order
for the FactoryExtensionFinder to be able to find the factory.sourceCode - The source code of the script.
@Deprecated
public static Script getScriptInstance(String sourceCode,
String[] modules,
Script.ModulesType modulesType)
getScriptInstance(ExternalContext, String, String[], Script.ModulesType) instead.
Returns a new instance of Script from the ScriptFactory found by the FactoryExtensionFinder. The returned instance is guaranteed to be Serializable but
not guaranteed to be thread-safe.
sourceCode - The source code of the Script.modules - The modules which the Script depends on.modulesType - The Script.ModulesType of the Script.
public static Script getScriptInstance(javax.faces.context.ExternalContext externalContext,
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.
externalContext - The external context associated with the current faces context. It is needed in order
for the FactoryExtensionFinder to be able to find the factory.sourceCode - The source code of the Script.modules - The modules which the Script depends on.modulesType - The Script.ModulesType of the Script.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 FacesContextHelperUtil.addScript(javax.faces.context.FacesContext,
com.liferay.faces.util.client.Script). As a convenience, it is possible to call FacesContextHelperUtil.addScript(javax.faces.context.FacesContext,
com.liferay.faces.util.client.Script) 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 FacesContextHelperUtil.addScript(javax.faces.context.FacesContext,
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>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||