Package org.exoplatform.web.application
Class JavascriptManager
java.lang.Object
org.exoplatform.web.application.JavascriptManager
Created by The eXo Platform SAS Mar 27, 2007
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.exoplatform.services.log.Logstatic final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidAdd a valid javascript codevoidvoidvoidReturns javascripts which were added byaddJavascript(CharSequence),addOnLoadJavascript(CharSequence),addOnResizeJavascript(CharSequence),addOnScrollJavascript(CharSequence),addCustomizedOnLoadScript(CharSequence),requireJSReturn a map of JS resource ids (required to be load for current page) and boolean: true if that script should be push on the header before html.voidloadScriptResource(String name) Register a SHARE Javascript resource that will be loaded in Rendering phase Script FetchMode is ON_LOAD by defaultvoidloadScriptResource(ResourceScope scope, String name) Register a Javascript resource that will be loaded in Rendering phase If mode is null, script will be loaded with mode defined in gatein-resources.xml
-
Field Details
-
USE_WEBUI_RESOURCES
public static final boolean USE_WEBUI_RESOURCES -
LOG
public static final org.exoplatform.services.log.Log LOG
-
-
Constructor Details
-
JavascriptManager
public JavascriptManager() -
JavascriptManager
-
-
Method Details
-
addJavascript
Add a valid javascript code- Parameters:
s- a valid javascript code
-
loadScriptResource
Register a SHARE Javascript resource that will be loaded in Rendering phase Script FetchMode is ON_LOAD by default -
loadScriptResource
Register a Javascript resource that will be loaded in Rendering phase If mode is null, script will be loaded with mode defined in gatein-resources.xml -
getScriptResources
-
getExtendedScriptURLs
-
addExtendedScriptURLs
-
addOnLoadJavascript
-
addOnResizeJavascript
-
addOnScrollJavascript
-
addCustomizedOnLoadScript
-
getJavaScripts
Returns javascripts which were added byaddJavascript(CharSequence),addOnLoadJavascript(CharSequence),addOnResizeJavascript(CharSequence),addOnScrollJavascript(CharSequence),addCustomizedOnLoadScript(CharSequence),requireJS- Returns:
-
getPageScripts
Return a map of JS resource ids (required to be load for current page) and boolean: true if that script should be push on the header before html. false if that script should be load lazily after html has been loaded
JS resources always contains SHARED/bootstrap required to be loaded eagerly and optionally (by configuration) contains: portal js, portlet js, and resouces registered to be load through JavascriptManager- Returns:
-
require
-
require
-
getRequireJS
-
generateUUID
-
getJavascriptConfigService
-