gpt4 book ai didi

jsf - :ckEditor doesn't work anymore after adding CombinedResourceHandler

转载 作者:行者123 更新时间:2023-12-03 03:25:36 25 4
gpt4 key购买 nike

我添加了OmniFaces使用 CombinedResourceHandler 。但现在PrimeFaces Extensions <pe:ckEditor> 不再起作用了。

这个问题有解决办法吗?

最佳答案

不幸的是,这是一个已知问题,由 PrimeFaces Extensions 加载和管理其 JS 资源的方式引起。这已经被报告为旧 Google Code 主机上的问题,并在当前的 OmniFaces known issues wiki 中提到。如下:

PrimeFaces Extensions <=0.7.1-4.0.0 (and probably future versions)

PrimeFaces Extensions JS resource primefaces-extensions.js is incompatible with CombinedResourceHandler. During load, it attempts to figure the version from its own <script> element 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 to web.xml telling the CombinedResourceHandler to not combine the PrimeFaces Extensions main script file:

<context-param>
<param-name>org.omnifaces.COMBINED_RESOURCE_HANDLER_EXCLUDED_RESOURCES</param-name>
<param-value>primefaces-extensions:primefaces-extensions.js</param-value>
</context-param>

If you're using OmniFaces 2.2 or newer, then you can use a wildcard * as name:

<context-param>
<param-name>org.omnifaces.COMBINED_RESOURCE_HANDLER_EXCLUDED_RESOURCES</param-name>
<param-value>primefaces-extensions:*</param-value>
</context-param>

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 in faces-config.xml:

<application>
<resource-handler>org.omnifaces.resourcehandler.CombinedResourceHandler</resource-handler>
<resource-handler>org.primefaces.extensions.application.PrimeFacesExtensionsResourceHandler</resource-handler>
</application>

关于jsf - :ckEditor doesn't work anymore after adding CombinedResourceHandler,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25003338/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com