I added OmniFaces to use the CombinedResourceHandler.
But now the PrimeFaces Extensions
Is there any workaround for this issue?
Unfortunately, this is a known issue caused by the way how PrimeFaces Extensions loads and manages its JS resources. This was already ever reported as an issue on old Google Code host and is mentioned in the current OmniFaces known issues wiki as follows:
PrimeFaces Extensions <=0.7.1-4.0.0 (and probably future versions)
PrimeFaces Extensions JS resource
primefaces-extensions.js
is incompatible withCombinedResourceHandler
. During load, it attempts to figure the version from its ownelement in order to dynamically load additional CSS/JS resources. This is however absent and the attempt fails with a JS error which in turn causes the dynamic loading of additional CSS/JS resources for e.g. CKEditor to fail.
Your best bet is to exclude
primefaces-extensions.js
from combining by adding the following entry toweb.xml
telling theCombinedResourceHandler
to not combine the PrimeFaces Extensions main script file:
org.omnifaces.COMBINED_RESOURCE_HANDLER_EXCLUDED_RESOURCES primefaces-extensions:primefaces-extensions.js If you're using OmniFaces 2.2 or newer, then you can use a wildcard
*
as name:
org.omnifaces.COMBINED_RESOURCE_HANDLER_EXCLUDED_RESOURCES primefaces-extensions:* If you're using PrimeFaces Extensions before version 3.0.0, then you also need to make sure that the PrimeFaces Extensions own resource handler is explicitly declared after
CombinedResourceHandler
infaces-config.xml
:
org.omnifaces.resourcehandler.CombinedResourceHandler org.primefaces.extensions.application.PrimeFacesExtensionsResourceHandler