Package com.jalios.jcms.uicomponent
Class WebAssetsUtils
java.lang.Object
com.jalios.jcms.uicomponent.WebAssetsUtils
Utils class to handle the web assets (CSS, JavaScript and image files ...) of
the external libraries.
- Author:
- ndossantos, sdevaux
-
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddCSSResources(JcmsJspContext jcmsContext, String feature) Adds CSS resources to jcmsContext resources declared using feature id.protected static voidaddJSResources(JcmsJspContext jcmsContext, String feature) Adds JS resources to jcmsContext resources declared using feature id.static voidaddScrollbarWebAssets(JcmsJspContext jcmsContext) Add web assets for the scrollbar library.static voidaddWebAssets(JcmsJspContext jcmsContext, String feature) Adds given feature web assets to given context.protected static Collection<String> getResources(String property) Loads a collection of ordered (web assets) resources given the property.
-
Method Details
-
addScrollbarWebAssets
Add web assets for the scrollbar library.- Parameters:
jcmsContext- the context to fill with new JS/CSS resources
-
addWebAssets
Adds given feature web assets to given context.Feature assets are declared using properties syntax:
jcms.front.resources.{feature-id}.js: relative JS file list, comma separated jcms.front.resources.{feature-id}.css: relative CSS file list, comma separated- Parameters:
jcmsContext- the context to fill with new JS/CSS resourcesfeature- a feature id, declared using properties- Since:
- jcms-10.0.2
-
addJSResources
Adds JS resources to jcmsContext resources declared using feature id.- Parameters:
jcmsContext- the context to fill with new JS/CSS resourcesfeature- the feature id- Since:
- jcms-10.0.2
-
addCSSResources
Adds CSS resources to jcmsContext resources declared using feature id.- Parameters:
jcmsContext- the context to fill with new JS/CSS resourcesfeature- the feature id- Since:
- jcms-10.0.2
-
getResources
Loads a collection of ordered (web assets) resources given the property.- Parameters:
property- the property to load associated resources- Returns:
- a collection of JS or CSS resources paths
- Since:
- jcms-10.0.2
-