本文介绍了如何将Font Awesome 4.3.0与JSF集成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试过这种方法:

I've already tried this method:

如何使用webjars.org中的Font Awesome使用JSF

实际上效果很好.问题在于将omnifaces UnmappedResourceHandler配置为资源处理程序会破坏我的其他JSF库组件之一:

It actually works great. The problem is that configuring the omnifaces UnmappedResourceHandler as a resource handler breaks one of my other JSF library components:

faces-config.xml:

<application>
    <resource-handler>org.omnifaces.resourcehandler.UnmappedResourceHandler</resource-handler>
</application>

当我尝试使用 ace:dataExporter (我认为它与 p:dataExporter 相同)

When I try to use an ace:dataExporter (which I think is the same as a p:dataExporter)

webpage.xhtml:

<ace:dataExporter target="dataTable" fileName="data" type="csv"/>

什么也没有导出,我在我的glassfish日志中得到了以下内容:

Nothing gets exported and I get the following in my glassfish logs:

Warning: JSF1091: No mime type could be found for file s01a3dc15-c480-4769-a71a-bc08f191416f.  To resolve this, add a mime-type mapping to the applications web.xml.
Warning: JSF1091: No mime type could be found for file 71a-bc08f191416f.  To resolve this, add a mime-type mapping to the applications web.xml.

我愿意接受将字体真棒打包到我的Web应用程序中的其他建议(我不能使用CDN版本).

I'm open to any other suggestions to packaging font-awesome into my web application (I can't use the CDN version).

推荐答案

如果使用最新的webjars字体超赞版本,则无需进行任何配置.可以通过maven或直接将jar添加到您的项目中,这样就可以了.只要确保您包含正确的CSS

If you use the latest webjars font-awesome version, there is nothing to configure. Add the jar to your project, either via maven or directly and it just works. Just make sure you include the correct css

<h:outputStylesheet library="webjars" name="font-awesome/4.3.0/css/font-awesome-jsf.css" />

这篇关于如何将Font Awesome 4.3.0与JSF集成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 03:24